Skip to content

Commit fa508a6

Browse files
authored
Merge branch 'develop' into develop
2 parents 840e3a9 + 63422de commit fa508a6

File tree

18 files changed

+273
-15
lines changed

18 files changed

+273
-15
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<AssemblyVersion>$(Version)</AssemblyVersion>
77
<FileVersion>$(Version)</FileVersion>
88
<Product>Testcontainers</Product>
9-
<Copyright>Copyright (c) 2019 - 2024 Andre Hofmeister and other authors</Copyright>
9+
<Copyright>Copyright (c) 2019 - 2025 Andre Hofmeister and other authors</Copyright>
1010
<Authors>Andre Hofmeister and contributors</Authors>
1111
<Company>Andre Hofmeister</Company>
1212
<Description>Testcontainers for .NET is a library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions.</Description>

Directory.Packages.props

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
<PackageVersion Include="coverlet.collector" Version="6.0.2"/>
1919
<PackageVersion Include="Dapper" Version="2.1.35"/>
2020
<PackageVersion Include="ReflectionMagic" Version="5.0.1"/>
21-
<PackageVersion Include="xunit.extensibility.execution" Version="2.9.0"/>
22-
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2"/>
23-
<PackageVersion Include="xunit.v3.extensibility.core" Version="0.2.0-pre.69"/>
21+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.0"/>
2422
<PackageVersion Include="xunit" Version="2.9.2"/>
23+
<!-- xUnit.net extensibility for Testcontainers.Xunit and Testcontainers.XunitV3 packages: -->
24+
<PackageVersion Include="xunit.extensibility.execution" Version="2.9.0"/>
25+
<PackageVersion Include="xunit.v3.extensibility.core" Version="1.0.0"/>
2526
<!-- Third-party client dependencies to connect and interact with the containers: -->
2627
<PackageVersion Include="Apache.NMS.ActiveMQ" Version="2.1.0"/>
2728
<PackageVersion Include="ArangoDBNetStandard" Version="2.0.1"/>

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019 - 2024 Andre Hofmeister and other authors
3+
Copyright (c) 2019 - 2025 Andre Hofmeister and other authors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ See [LICENSE](https://github.com/testcontainers/testcontainers-dotnet/blob/main/
1919

2020
## Copyright
2121

22-
Copyright (c) 2019 - 2024 Andre Hofmeister and other authors.
22+
Copyright (c) 2019 - 2025 Andre Hofmeister and other authors.
2323

2424
See [contributors][testcontainers-dotnet-contributors] for all contributors.
2525

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ See [LICENSE](https://raw.githubusercontent.com/testcontainers/testcontainers-do
8888

8989
## Copyright
9090

91-
Copyright (c) 2019 - 2024 Andre Hofmeister and other authors.
91+
Copyright (c) 2019 - 2025 Andre Hofmeister and other authors.
9292

9393
See [contributors][testcontainers-dotnet-contributors] for all contributors.
9494

src/Testcontainers.Pulsar/PulsarBuilder.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public override PulsarContainer Build()
7575
waitStrategy = waitStrategy.UntilMessageIsLogged("Function worker service started");
7676
}
7777

78-
var pulsarBuilder = WithWaitStrategy(waitStrategy);
78+
var pulsarBuilder = DockerResourceConfiguration.WaitStrategies.Count() > 1 ? this : WithWaitStrategy(waitStrategy);
7979
return new PulsarContainer(pulsarBuilder.DockerResourceConfiguration);
8080
}
8181

@@ -156,9 +156,6 @@ public Task<bool> UntilAsync(IContainer container)
156156
/// <inheritdoc cref="IWaitUntil.UntilAsync" />
157157
private async Task<bool> UntilAsync(PulsarContainer container)
158158
{
159-
_ = Guard.Argument(container, nameof(container))
160-
.NotNull();
161-
162159
if (_authenticationEnabled && _authToken == null)
163160
{
164161
try

src/Testcontainers.XunitV3/Testcontainers.XunitV3.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
<PropertyGroup>
33
<TargetFrameworks>net8.0;net9.0;netstandard2.0;netstandard2.1</TargetFrameworks>
44
<LangVersion>latest</LangVersion>
5-
<IsPackable>false</IsPackable>
6-
<IsPublishable>false</IsPublishable>
75
<DefineConstants>$(DefineConstants);XUNIT_V3</DefineConstants>
86
</PropertyGroup>
97
<ItemGroup>

src/Testcontainers/Builders/MTlsEndpointAuthenticationProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected override X509Certificate2 GetClientCertificate()
5656
return Polyfills.X509Certificate2.CreateFromPemFile(clientCertificateFilePath, clientCertificateKeyFilePath);
5757
#elif NET9_0_OR_GREATER
5858
var certificate = X509Certificate2.CreateFromPemFile(clientCertificateFilePath, clientCertificateKeyFilePath);
59-
return OperatingSystem.IsWindows() ? X509CertificateLoader.LoadCertificate(certificate.Export(X509ContentType.Pfx)) : certificate;
59+
return OperatingSystem.IsWindows() ? X509CertificateLoader.LoadPkcs12(certificate.Export(X509ContentType.Pfx), null) : certificate;
6060
#elif NET6_0_OR_GREATER
6161
var certificate = X509Certificate2.CreateFromPemFile(clientCertificateFilePath, clientCertificateKeyFilePath);
6262
return OperatingSystem.IsWindows() ? new X509Certificate2(certificate.Export(X509ContentType.Pfx)) : certificate;

src/Testcontainers/Clients/DockerContainerOperations.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,18 @@ public Task StopAsync(string id, CancellationToken ct = default)
9191
return DockerClient.Containers.StopContainerAsync(id, new ContainerStopParameters { WaitBeforeKillSeconds = 15 }, ct);
9292
}
9393

94+
public Task PauseAsync(string id, CancellationToken ct = default)
95+
{
96+
Logger.PauseDockerContainer(id);
97+
return DockerClient.Containers.PauseContainerAsync(id, ct);
98+
}
99+
100+
public Task UnpauseAsync(string id, CancellationToken ct = default)
101+
{
102+
Logger.UnpauseDockerContainer(id);
103+
return DockerClient.Containers.UnpauseContainerAsync(id, ct);
104+
}
105+
94106
public Task RemoveAsync(string id, CancellationToken ct = default)
95107
{
96108
Logger.DeleteDockerContainer(id);

src/Testcontainers/Clients/IDockerContainerOperations.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ internal interface IDockerContainerOperations : IHasListOperations<ContainerList
1919

2020
Task StopAsync(string id, CancellationToken ct = default);
2121

22+
Task PauseAsync(string id, CancellationToken ct = default);
23+
24+
Task UnpauseAsync(string id, CancellationToken ct = default);
25+
2226
Task RemoveAsync(string id, CancellationToken ct = default);
2327

2428
Task ExtractArchiveToContainerAsync(string id, string path, TarOutputMemoryStream tarStream, CancellationToken ct = default);

0 commit comments

Comments
 (0)