3.0.0
版本发布时间: 2023-03-08 17:37:40
testcontainers/testcontainers-dotnet最新发布版本:3.6.0(2023-11-11 03:49:34)
What's Changed
We have added and replaced the modules mentioned below. Each module contains its own builder and configuration type, making it much easier to support various test cases. Currently, the modules are designed to quickly spin up common configurations of real dependencies to establish a connection to the application or service running inside it.
We are interested in your opinions and requirements in regards of the module's capabilities. Creating great modules is a community effort, so please consider sharing your thoughts with us and other Testcontainers users in this discussion or in our Slack workspace.
We will continuously add module features and documentation. Currently, information on how to configure and run modules can be found in the tests. If you are already familiar with Testcontainers, you should have no trouble understanding it as the experience is very similar as before. Here is a quick example using xUnit.net:
public sealed class ModuleSupport : IAsyncLifetime
{
private readonly MsSqlContainer _msSqlContainer = new MsSqlBuilder().Build();
public Task InitializeAsync()
{
return _msSqlContainer.StartAsync();
}
public Task DisposeAsync()
{
return _msSqlContainer.DisposeAsync().AsTask();
}
[Fact]
public void ConnectionStateReturnsOpen()
{
// Given
using DbConnection connection = new SqlConnection(_msSqlContainer.GetConnectionString());
// When
connection.Open();
// Then
Assert.Equal(ConnectionState.Open, connection.State);
}
}
⚠️ Breaking Changes
- chore!: Remove legacy WithCreateContainerParametersModifier(Action<CreateContainerParameters>) (#809) @HofmeisterAn
- chore!: Remove legacy IDockerImage (#808) @HofmeisterAn
- chore!: Remove legacy TestcontainersVolumeBuilder, IDockerVolume (#805) @HofmeisterAn
- chore!: Remove legacy TestcontainersNetworkBuilder, IDockerNetwork (#804) @HofmeisterAn
Old name | New name |
---|---|
ITestcontainersContainer , IDockerContainer , IRunningDockerContainer |
IContainer |
IDockerImage |
IImage |
IDockerNetwork |
INetwork |
IDockerVolume |
IVolume |
TestcontainersBuilder |
ContainerBuilder |
TestcontainersContainer |
DockerContainer |
TestcontainersNetworkBuilder |
NetworkBuilder |
TestcontainersVolumeBuilder |
VolumeBuilder |
WithCreateContainerParametersModifier |
WithCreateParameterModifier |
🚀 Features
- feat: Sign assemblies with a strong name (#815) @HofmeisterAn
- feat: Add SQL Edge module (#812) @HofmeisterAn
- feat: Replace Kafka module (#802) @HofmeisterAn
- feat: Replace Couchbase module (#798) @HofmeisterAn
- feat: Add Redpanda module (#796) @eddumelendez
- fix: Wait until container ports are mapped, removed generated credentials (#791) @HofmeisterAn
- feat: Replace output consumer with
IContainer.GetLogsAsync(DateTime, DateTime, bool, CancellationToken)
(#793) @HofmeisterAn - feat: Add EventStoreDb module (#778) @meysamhadeli
- feat: Replace Elasticsearch module (#790) @HofmeisterAn
- feat: Replace RabbitMq module (#788) @HofmeisterAn
- feat: Replace Neo4j module (#785) @HofmeisterAn
- feat: Replace CouchDb module (#779) @HofmeisterAn
- feat: Replace MongoDB module (#776) @HofmeisterAn
- feat: Add DynamoDB module (#768) @dominikus1993
- feat: Replace PostgreSQL module (#772) @HofmeisterAn
- feat: Replace Oracle module (#770) @HofmeisterAn
- feat: Add RavenDB module (#769) @HofmeisterAn
- feat: Add MinIO module (#760) @dominikus1993
- feat: Replace Redis module (#764) @HofmeisterAn
- feat: Replace MariaDB module (#763) @HofmeisterAn
- feat: Replace MySQL module (#761) @HofmeisterAn
- feat: Replace Microsoft SQL Server module (#757) @HofmeisterAn
🐛 Bug Fixes
- fix: InvalidOperationException when adding future volume (#817) @HofmeisterAn
- fix: Wait until container ports are mapped, removed generated credentials (#791) @HofmeisterAn
- fix(#783): Dispose container while Resource Reaper is disabled (#789) @HofmeisterAn
📖 Documentation
- docs: Add best practices (#816) @HofmeisterAn
- docs: Add community links (#807) @HofmeisterAn
- docs: Update Testcontainers for Node docs link (#806) @cristianrgreco
- docs: Add section 'Implement a module' (#771) @HofmeisterAn
- docs: Replace obsolete builders (#756) @HofmeisterAn
🧹 Housekeeping
- fix: Coverlet 'Unable to read beyond end of stream' IOException (#800) @HofmeisterAn
- chore: Clean up EventStoreDb module (#792) @HofmeisterAn
- chore: Clean up LocalStack module (#781) @HofmeisterAn
- chore: Clean up DynamoDB module (#774) @HofmeisterAn
- chore: Clean up MinIO module (#766) @HofmeisterAn
- fix: Use TCP to connect to the MySQL module (#765) @HofmeisterAn
- fix: Use sqlcmd utility to detect readiness of the container (#759) @HofmeisterAn
- fix: Move MsSqlContainerTest class to namespace (#758) @HofmeisterAn
- chore: Update the WeatherForecast example to 2.4.0 (#754) @HofmeisterAn
- chore: Remove obsolete property IDockerNetwork.Id (#753) @HofmeisterAn
- feat: Prepare next release cycle (2.5.0) (#752) @HofmeisterAn