Skip to content

Commit 36758c8

Browse files
committed
fix: Remove minor Sonar findings
1 parent 6e6ccb5 commit 36758c8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Testcontainers.Couchbase/CouchbaseContainer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public CouchbaseContainer(CouchbaseConfiguration configuration)
1515
{
1616
_configuration = configuration;
1717
Starting += (_, _) => Logger.LogInformation("Couchbase container is starting, performing configuration.");
18-
Started += (_, _) => Logger.LogInformation($"Couchbase container is ready! UI available at {new UriBuilder(Uri.UriSchemeHttp, Hostname, GetMappedPublicPort(CouchbaseBuilder.MgmtPort))}");
18+
Started += (_, _) => Logger.LogInformation("Couchbase container is ready! UI available at {Url}.", new UriBuilder(Uri.UriSchemeHttp, Hostname, GetMappedPublicPort(CouchbaseBuilder.MgmtPort)));
1919
}
2020

2121
/// <summary>

src/Testcontainers/Clients/DockerApiClient.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ await RuntimeInitialized.WaitAsync(ct)
109109
runtimeInfo.Append(" Total Memory: ");
110110
runtimeInfo.AppendFormat(CultureInfo.InvariantCulture, "{0:F} {1}", dockerInfo.MemTotal / Math.Pow(1024, byteUnits.Length), byteUnits[byteUnits.Length - 1]);
111111

112-
Logger.LogInformation(runtimeInfo.ToString());
112+
Logger.LogInformation("{RuntimeInfo}", runtimeInfo);
113113
}
114114
catch(Exception e)
115115
{

tests/Testcontainers.Platform.Linux.Tests/LoggerTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public Task DisposeAsync()
3030
[InlineData(2)]
3131
public void LogContainerRuntimeInformationOnce(int _)
3232
{
33-
Assert.Contains("Connected to Docker", _fakeLogger.Collector.GetSnapshot().First().Message);
33+
Assert.Contains("Connected to Docker", _fakeLogger.Collector.GetSnapshot()[0].Message);
3434
}
3535

3636
[UsedImplicitly]

0 commit comments

Comments
 (0)