Skip to content

Commit

Permalink
fix: Remove minor Sonar findings
Browse files Browse the repository at this point in the history
  • Loading branch information
HofmeisterAn committed Mar 11, 2024
1 parent 6e6ccb5 commit 36758c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Testcontainers.Couchbase/CouchbaseContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public CouchbaseContainer(CouchbaseConfiguration configuration)
{
_configuration = configuration;
Starting += (_, _) => Logger.LogInformation("Couchbase container is starting, performing configuration.");
Started += (_, _) => Logger.LogInformation($"Couchbase container is ready! UI available at {new UriBuilder(Uri.UriSchemeHttp, Hostname, GetMappedPublicPort(CouchbaseBuilder.MgmtPort))}");
Started += (_, _) => Logger.LogInformation("Couchbase container is ready! UI available at {Url}.", new UriBuilder(Uri.UriSchemeHttp, Hostname, GetMappedPublicPort(CouchbaseBuilder.MgmtPort)));
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Testcontainers/Clients/DockerApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ await RuntimeInitialized.WaitAsync(ct)
runtimeInfo.Append(" Total Memory: ");
runtimeInfo.AppendFormat(CultureInfo.InvariantCulture, "{0:F} {1}", dockerInfo.MemTotal / Math.Pow(1024, byteUnits.Length), byteUnits[byteUnits.Length - 1]);

Logger.LogInformation(runtimeInfo.ToString());
Logger.LogInformation("{RuntimeInfo}", runtimeInfo);
}
catch(Exception e)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Testcontainers.Platform.Linux.Tests/LoggerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public Task DisposeAsync()
[InlineData(2)]
public void LogContainerRuntimeInformationOnce(int _)
{
Assert.Contains("Connected to Docker", _fakeLogger.Collector.GetSnapshot().First().Message);
Assert.Contains("Connected to Docker", _fakeLogger.Collector.GetSnapshot()[0].Message);
}

[UsedImplicitly]
Expand Down

0 comments on commit 36758c8

Please sign in to comment.