Skip to content

Commit

Permalink
#INIT 'assemblyName: DotNet.Testcontainers; version: 1.7.0'
Browse files Browse the repository at this point in the history
HofmeisterAn committed Jun 8, 2022

Verified

This commit was signed with the committer’s verified signature.
HofmeisterAn Andre Hofmeister
1 parent 2aeec1e commit ad6665b
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
</PropertyGroup>
<PropertyGroup>
<PackageId>$(AssemblyName)</PackageId>
<Version>1.6.0</Version>
<Version>1.7.0</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<Product>.NET Testcontainers</Product>
9 changes: 4 additions & 5 deletions src/DotNet.Testcontainers/Builders/TestcontainersBuilder.cs
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@ namespace DotNet.Testcontainers.Builders
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
@@ -324,10 +323,10 @@ protected virtual ITestcontainersBuilder<TDockerContainer> MergeNewConfiguration
var networks = BuildConfiguration.Combine(dockerResourceConfiguration.Networks, this.DockerResourceConfiguration.Networks);

var dockerEndpointAuthConfig = BuildConfiguration.Combine(dockerResourceConfiguration.DockerEndpointAuthConfig, this.DockerResourceConfiguration.DockerEndpointAuthConfig);
var dockerRegistryAuthConfig = new[] { dockerResourceConfiguration.DockerRegistryAuthConfig, this.DockerResourceConfiguration.DockerRegistryAuthConfig }.First(config => config != null);
var outputConsumer = new[] { dockerResourceConfiguration.OutputConsumer, this.DockerResourceConfiguration.OutputConsumer }.First(config => config != null);
var waitStrategies = new[] { dockerResourceConfiguration.WaitStrategies, this.DockerResourceConfiguration.WaitStrategies }.First(config => config != null);
var startupCallback = new[] { dockerResourceConfiguration.StartupCallback, this.DockerResourceConfiguration.StartupCallback }.First(config => config != null);
var dockerRegistryAuthConfig = BuildConfiguration.Combine(dockerResourceConfiguration.DockerRegistryAuthConfig, this.DockerResourceConfiguration.DockerRegistryAuthConfig);
var outputConsumer = BuildConfiguration.Combine(dockerResourceConfiguration.OutputConsumer, this.DockerResourceConfiguration.OutputConsumer);
var waitStrategies = BuildConfiguration.Combine<IEnumerable<IWaitUntil>>(dockerResourceConfiguration.WaitStrategies, this.DockerResourceConfiguration.WaitStrategies);
var startupCallback = BuildConfiguration.Combine(dockerResourceConfiguration.StartupCallback, this.DockerResourceConfiguration.StartupCallback);

var updatedDockerResourceConfiguration = new TestcontainersConfiguration(dockerEndpointAuthConfig, dockerRegistryAuthConfig, image, name, hostname, workingDirectory, entrypoint, command, environments, labels, exposedPorts, portBindings, mounts, networks, outputConsumer, waitStrategies, startupCallback, autoRemove, privileged);
return new TestcontainersBuilder<TDockerContainer>(updatedDockerResourceConfiguration, moduleConfiguration ?? this.mergeModuleConfiguration);
4 changes: 2 additions & 2 deletions src/DotNet.Testcontainers/Clients/TestcontainersClient.cs
Original file line number Diff line number Diff line change
@@ -242,8 +242,8 @@ public async Task<string> RunAsync(ITestcontainersConfiguration configuration, C
if (!await this.images.ExistsWithNameAsync(configuration.Image.FullName, ct)
.ConfigureAwait(false))
{
var authConfig = !default(DockerRegistryAuthenticationConfiguration).Equals(configuration.DockerRegistryAuthConfig)
? configuration.DockerRegistryAuthConfig : this.registryAuthenticationProvider.GetAuthConfig(configuration.Image.GetHostname());
var authConfig = default(DockerRegistryAuthenticationConfiguration).Equals(configuration.DockerRegistryAuthConfig)
? this.registryAuthenticationProvider.GetAuthConfig(configuration.Image.GetHostname()) : configuration.DockerRegistryAuthConfig;

await this.images.CreateAsync(configuration.Image, authConfig, ct)
.ConfigureAwait(false);

0 comments on commit ad6665b

Please sign in to comment.