-
-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#335] #CHANGE 'assemblyName: DotNet.Testcontainers; function: Testco…
…ntainersContainer' {Fix TestcontainersContainerCancellationTest and TestcontainersWaitStrategyTest.}
- Loading branch information
1 parent
e697ee2
commit 5a394d0
Showing
5 changed files
with
62 additions
and
30 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
src/DotNet.Testcontainers.Tests/Fixtures/Containers/Modules/AlpineFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
namespace DotNet.Testcontainers.Tests.Fixtures.Containers.Modules | ||
{ | ||
using System.Threading.Tasks; | ||
using DotNet.Testcontainers.Containers.Builders; | ||
using DotNet.Testcontainers.Containers.Modules; | ||
using Xunit; | ||
|
||
public class AlpineFixture : ModuleFixture<TestcontainersContainer>, IAsyncLifetime | ||
{ | ||
public AlpineFixture() | ||
: base(new TestcontainersBuilder<TestcontainersContainer>() | ||
.WithImage("alpine") | ||
.Build()) | ||
{ | ||
} | ||
|
||
public Task InitializeAsync() | ||
{ | ||
return Task.WhenAll(this.Container.StartAsync(), this.Container.StopAsync()); | ||
} | ||
|
||
public Task DisposeAsync() | ||
{ | ||
return this.Container.DisposeAsync().AsTask(); | ||
} | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
src/DotNet.Testcontainers.Tests/Fixtures/Containers/Modules/ModuleFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters