Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Shared.IntegrationTesting/TestContainers/BaseDockerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
#region Methods
public async Task<Boolean> DoesNetworkExist(string networkName)
{
DockerClient? client = new DockerClientConfiguration().CreateClient();

Check warning on line 172 in Shared.IntegrationTesting/TestContainers/BaseDockerHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests - Linux

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 172 in Shared.IntegrationTesting/TestContainers/BaseDockerHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests - Windows

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

var networks = await client.Networks.ListNetworksAsync();

Expand All @@ -179,7 +179,7 @@
public virtual Dictionary<String,String> GetAdditionalVariables(ContainerType containerType){
Dictionary<String, String> result = new();

Dictionary<String, String>? additional = this.AdditionalVariables.SingleOrDefault(a => a.Key == containerType).Value;

Check warning on line 182 in Shared.IntegrationTesting/TestContainers/BaseDockerHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests - Linux

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 182 in Shared.IntegrationTesting/TestContainers/BaseDockerHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests - Windows

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
if (additional != null){
foreach (KeyValuePair<String, String> item in additional) {
result.Add(item.Key, item.Value);
Expand Down Expand Up @@ -216,8 +216,8 @@

public static async Task<SimpleResults.Result<DockerEnginePlatform>> GetDockerEnginePlatform(){
try{
DockerClient? docker = new DockerClientConfiguration().CreateClient();

Check warning on line 219 in Shared.IntegrationTesting/TestContainers/BaseDockerHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests - Linux

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 219 in Shared.IntegrationTesting/TestContainers/BaseDockerHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests - Windows

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
SystemInfoResponse? info = await docker.System.GetSystemInfoAsync();

Check warning on line 220 in Shared.IntegrationTesting/TestContainers/BaseDockerHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests - Linux

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 220 in Shared.IntegrationTesting/TestContainers/BaseDockerHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests - Windows

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

return info.OSType switch {
"linux" => Result.Success(DockerEnginePlatform.Linux),
Expand Down Expand Up @@ -569,8 +569,9 @@
// Give it a name, or it will be generated (recommended)
.WithName(networkName)
// **Crucial step: Specify the Windows-native 'nat' driver**
.WithDriver(NetworkDriver.Nat).WithReuse(reuseIfExists),
_ => new NetworkBuilder().WithName(networkName).WithReuse(reuseIfExists)
.WithDriver(NetworkDriver.Nat).WithReuse(reuseIfExists)
.WithLabel("reuse-id", networkName),
_ => new NetworkBuilder().WithName(networkName).WithReuse(reuseIfExists).WithLabel("reuse-id", networkName)
};

return networkService.Build();
Expand Down Expand Up @@ -857,7 +858,7 @@
try{
await projectionClient.CreateContinuousAsync(projectionName, projection, trackEmittedStreams:true).ConfigureAwait(false);
}
catch (Exception ex) {

Check warning on line 861 in Shared.IntegrationTesting/TestContainers/BaseDockerHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests - Linux

The variable 'ex' is declared but never used
// ignored
}

Expand Down
Loading