Skip to content

Commit e8c01bc

Browse files
committed
chore: Prepare next release cycle
1 parent 5edbe99 commit e8c01bc

15 files changed

Lines changed: 95 additions & 54 deletions

File tree

‎Directory.Build.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project>
33
<PropertyGroup>
44
<PackageId>$(AssemblyName)</PackageId>
5-
<Version>4.17.0</Version>
5+
<Version>4.18.0</Version>
66
<AssemblyVersion>$(Version)</AssemblyVersion>
77
<FileVersion>$(Version)</FileVersion>
88
<Product>Testcontainers</Product>

‎src/Testcontainers.Elasticsearch/ElasticsearchContainer.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public async Task<X509Certificate2> GetCertificateAsync(CancellationToken ct = d
8484
var certificateBytes = await ReadFileAsync(ElasticsearchBuilder.ElasticsearchHttpCaCertificateFilePath, ct)
8585
.ConfigureAwait(false);
8686

87-
#if NET5_0_OR_GREATER
87+
#if NET6_0_OR_GREATER
8888
return X509Certificate2.CreateFromPem(Encoding.Default.GetString(certificateBytes));
8989
#else
9090
return new X509Certificate2(certificateBytes);

‎src/Testcontainers.WebDriver/WebDriverContainer.cs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ public async Task ExportVideoAsync(string target, CancellationToken ct = default
5757
var bytes = await _ffmpegContainer.ReadFileAsync(WebDriverBuilder.VideoFilePath, ct)
5858
.ConfigureAwait(false);
5959

60-
#if NETSTANDARD2_1_OR_GREATER || NET6_0_OR_GREATER
60+
#if NETSTANDARD2_0
61+
File.WriteAllBytes(target, bytes);
62+
#else
6163
await File.WriteAllBytesAsync(target, bytes, ct)
6264
.ConfigureAwait(false);
63-
#else
64-
File.WriteAllBytes(target, bytes);
6565
#endif
6666
}
6767

‎src/Testcontainers.Xunit/DbContainerFixture.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ await base.DisposeAsyncCore()
5050
/// <inheritdoc />
5151
public DbConnection CreateConnection() => _testMethods.CreateConnection();
5252

53-
#if NET8_0_OR_GREATER
53+
#if NET7_0_OR_GREATER
5454
/// <inheritdoc />
5555
public DbConnection OpenConnection() => _testMethods.OpenConnection();
5656

‎src/Testcontainers.Xunit/DbContainerTest.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ await base.DisposeAsyncCore()
4949
/// <inheritdoc />
5050
public DbConnection CreateConnection() => _testMethods.CreateConnection();
5151

52-
#if NET8_0_OR_GREATER
52+
#if NET7_0_OR_GREATER
5353
/// <inheritdoc />
5454
public DbConnection OpenConnection() => _testMethods.OpenConnection();
5555

‎src/Testcontainers.Xunit/DbContainerTestMethods.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ internal sealed class DbContainerTestMethods(DbProviderFactory dbProviderFactory
55
private readonly DbProviderFactory _dbProviderFactory = dbProviderFactory ?? throw new ArgumentNullException(nameof(dbProviderFactory));
66
private readonly Lazy<string> _connectionString = connectionString ?? throw new ArgumentNullException(nameof(connectionString));
77

8-
#if NET8_0_OR_GREATER
8+
#if NET7_0_OR_GREATER
99
[CanBeNull]
1010
private DbDataSource _dbDataSource;
1111
private DbDataSource DbDataSource

‎src/Testcontainers.Xunit/IDbContainerTestMethods.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal interface IDbContainerTestMethods
1717
/// <returns>A new, closed connection to the database.</returns>
1818
DbConnection CreateConnection();
1919

20-
#if NET8_0_OR_GREATER
20+
#if NET7_0_OR_GREATER
2121
/// <summary>
2222
/// Returns a new, open connection to the database.
2323
/// </summary>

‎src/Testcontainers/Builders/MTlsEndpointAuthenticationProvider.cs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ protected override X509Certificate2 GetClientCertificate()
5252

5353
// The certificate must be exported to PFX on Windows to avoid "No credentials are available in the security package":
5454
// https://stackoverflow.com/questions/72096812/loading-x509certificate2-from-pem-file-results-in-no-credentials-are-available/72101855#72101855.
55-
#if NETSTANDARD
56-
return Polyfills.X509Certificate2.CreateFromPemFile(clientCertificateFilePath, clientCertificateKeyFilePath);
57-
#elif NET9_0_OR_GREATER
55+
#if NET9_0_OR_GREATER
5856
var certificate = X509Certificate2.CreateFromPemFile(clientCertificateFilePath, clientCertificateKeyFilePath);
5957
return OperatingSystem.IsWindows() ? X509CertificateLoader.LoadPkcs12(certificate.Export(X509ContentType.Pfx), null) : certificate;
60-
#elif NET6_0_OR_GREATER
58+
#elif NET5_0_OR_GREATER
6159
var certificate = X509Certificate2.CreateFromPemFile(clientCertificateFilePath, clientCertificateKeyFilePath);
6260
return OperatingSystem.IsWindows() ? new X509Certificate2(certificate.Export(X509ContentType.Pfx)) : certificate;
61+
#else
62+
return Polyfills.X509Certificate2.CreateFromPemFile(clientCertificateFilePath, clientCertificateKeyFilePath);
6363
#endif
6464
}
6565
}

‎src/Testcontainers/Clients/TestcontainersClient.cs‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,13 +297,8 @@ public async Task<byte[]> ReadFileAsync(string id, string filePath, Cancellation
297297

298298
var readBytes = new byte[entry.Size];
299299

300-
#if NETSTANDARD2_0
301-
_ = await tarInputStream.ReadAsync(readBytes, 0, readBytes.Length, ct)
302-
.ConfigureAwait(false);
303-
#else
304300
_ = await tarInputStream.ReadAsync(readBytes, ct)
305301
.ConfigureAwait(false);
306-
#endif
307302

308303
return readBytes;
309304
}

‎src/Testcontainers/Configurations/Commons/ResourceConfiguration.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public virtual string GetReuseHash()
103103

104104
var jsonUtf8Bytes = JsonSerializer.SerializeToUtf8Bytes(this, GetType(), DefaultJsonSerializerOptions.Instance);
105105

106-
#if NET6_0_OR_GREATER
106+
#if NET5_0_OR_GREATER
107107
return Convert.ToBase64String(SHA1.HashData(jsonUtf8Bytes));
108108
#else
109109
using (var sha1 = SHA1.Create())

0 commit comments

Comments
 (0)