diff --git a/Testcontainers.sln b/Testcontainers.sln index 4f3cced06..c54d8bc58 100644 --- a/Testcontainers.sln +++ b/Testcontainers.sln @@ -79,8 +79,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Neo4j", "src EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Oracle", "src\Testcontainers.Oracle\Testcontainers.Oracle.csproj", "{596EAFC1-0496-495C-B382-D57415FA456A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Papercut", "src\Testcontainers.Papercut\Testcontainers.Papercut.csproj", "{464F1120-A0DA-462B-B9E8-45176D883625}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.PostgreSql", "src\Testcontainers.PostgreSql\Testcontainers.PostgreSql.csproj", "{8AB91636-9055-4900-A72A-7CFFACDFDBF0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.PubSub", "src\Testcontainers.PubSub\Testcontainers.PubSub.csproj", "{E6642255-667D-476B-B584-089AA5E6C0B1}" @@ -95,8 +93,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Redis", "src EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Redpanda", "src\Testcontainers.Redpanda\Testcontainers.Redpanda.csproj", "{45D6F69C-4D87-4130-AA90-0DB2F7460DAE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.SqlEdge", "src\Testcontainers.SqlEdge\Testcontainers.SqlEdge.csproj", "{C95A3B2F-2B28-49A7-8806-731C158BBC21}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.WebDriver", "src\Testcontainers.WebDriver\Testcontainers.WebDriver.csproj", "{64A87DE5-29B0-4A54-9E74-560484D8C7C0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Xunit", "src\Testcontainers.Xunit\Testcontainers.Xunit.csproj", "{380BB29B-F556-404D-B13B-CA250599C565}" @@ -175,8 +171,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Neo4j.Tests" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Oracle.Tests", "tests\Testcontainers.Oracle.Tests\Testcontainers.Oracle.Tests.csproj", "{4AC1088B-9965-4497-AC8E-570F1AD5631F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Papercut.Tests", "tests\Testcontainers.Papercut.Tests\Testcontainers.Papercut.Tests.csproj", "{904C8476-FCEF-41F0-8948-9EFA7C08712E}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Platform.Linux.Tests", "tests\Testcontainers.Platform.Linux.Tests\Testcontainers.Platform.Linux.Tests.csproj", "{DA1D7ADE-452C-4369-83CC-56289176EACD}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Platform.Windows.Tests", "tests\Testcontainers.Platform.Windows.Tests\Testcontainers.Platform.Windows.Tests.csproj", "{3E55CBE8-AFE8-426D-9470-49D63CD1051C}" @@ -197,8 +191,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Redpanda.Tes EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.ResourceReaper.Tests", "tests\Testcontainers.ResourceReaper.Tests\Testcontainers.ResourceReaper.Tests.csproj", "{9E8E6AA5-65D1-498F-BEAB-BA34723A0050}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.SqlEdge.Tests", "tests\Testcontainers.SqlEdge.Tests\Testcontainers.SqlEdge.Tests.csproj", "{1A1983E6-5297-435F-B467-E8E1F11277D6}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Tests", "tests\Testcontainers.Tests\Testcontainers.Tests.csproj", "{27CDB869-A150-4593-958F-6F26E5391E7C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.WebDriver.Tests", "tests\Testcontainers.WebDriver.Tests\Testcontainers.WebDriver.Tests.csproj", "{EBA72C3B-57D5-43FF-A5B4-3D55B3B6D4C2}" @@ -346,10 +338,6 @@ Global {596EAFC1-0496-495C-B382-D57415FA456A}.Debug|Any CPU.Build.0 = Debug|Any CPU {596EAFC1-0496-495C-B382-D57415FA456A}.Release|Any CPU.ActiveCfg = Release|Any CPU {596EAFC1-0496-495C-B382-D57415FA456A}.Release|Any CPU.Build.0 = Release|Any CPU - {464F1120-A0DA-462B-B9E8-45176D883625}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {464F1120-A0DA-462B-B9E8-45176D883625}.Debug|Any CPU.Build.0 = Debug|Any CPU - {464F1120-A0DA-462B-B9E8-45176D883625}.Release|Any CPU.ActiveCfg = Release|Any CPU - {464F1120-A0DA-462B-B9E8-45176D883625}.Release|Any CPU.Build.0 = Release|Any CPU {8AB91636-9055-4900-A72A-7CFFACDFDBF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8AB91636-9055-4900-A72A-7CFFACDFDBF0}.Debug|Any CPU.Build.0 = Debug|Any CPU {8AB91636-9055-4900-A72A-7CFFACDFDBF0}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -378,10 +366,6 @@ Global {45D6F69C-4D87-4130-AA90-0DB2F7460DAE}.Debug|Any CPU.Build.0 = Debug|Any CPU {45D6F69C-4D87-4130-AA90-0DB2F7460DAE}.Release|Any CPU.ActiveCfg = Release|Any CPU {45D6F69C-4D87-4130-AA90-0DB2F7460DAE}.Release|Any CPU.Build.0 = Release|Any CPU - {C95A3B2F-2B28-49A7-8806-731C158BBC21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C95A3B2F-2B28-49A7-8806-731C158BBC21}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C95A3B2F-2B28-49A7-8806-731C158BBC21}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C95A3B2F-2B28-49A7-8806-731C158BBC21}.Release|Any CPU.Build.0 = Release|Any CPU {64A87DE5-29B0-4A54-9E74-560484D8C7C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64A87DE5-29B0-4A54-9E74-560484D8C7C0}.Debug|Any CPU.Build.0 = Debug|Any CPU {64A87DE5-29B0-4A54-9E74-560484D8C7C0}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -538,10 +522,6 @@ Global {4AC1088B-9965-4497-AC8E-570F1AD5631F}.Debug|Any CPU.Build.0 = Debug|Any CPU {4AC1088B-9965-4497-AC8E-570F1AD5631F}.Release|Any CPU.ActiveCfg = Release|Any CPU {4AC1088B-9965-4497-AC8E-570F1AD5631F}.Release|Any CPU.Build.0 = Release|Any CPU - {904C8476-FCEF-41F0-8948-9EFA7C08712E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {904C8476-FCEF-41F0-8948-9EFA7C08712E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {904C8476-FCEF-41F0-8948-9EFA7C08712E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {904C8476-FCEF-41F0-8948-9EFA7C08712E}.Release|Any CPU.Build.0 = Release|Any CPU {DA1D7ADE-452C-4369-83CC-56289176EACD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DA1D7ADE-452C-4369-83CC-56289176EACD}.Debug|Any CPU.Build.0 = Debug|Any CPU {DA1D7ADE-452C-4369-83CC-56289176EACD}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -582,10 +562,6 @@ Global {9E8E6AA5-65D1-498F-BEAB-BA34723A0050}.Debug|Any CPU.Build.0 = Debug|Any CPU {9E8E6AA5-65D1-498F-BEAB-BA34723A0050}.Release|Any CPU.ActiveCfg = Release|Any CPU {9E8E6AA5-65D1-498F-BEAB-BA34723A0050}.Release|Any CPU.Build.0 = Release|Any CPU - {1A1983E6-5297-435F-B467-E8E1F11277D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1A1983E6-5297-435F-B467-E8E1F11277D6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1A1983E6-5297-435F-B467-E8E1F11277D6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1A1983E6-5297-435F-B467-E8E1F11277D6}.Release|Any CPU.Build.0 = Release|Any CPU {27CDB869-A150-4593-958F-6F26E5391E7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {27CDB869-A150-4593-958F-6F26E5391E7C}.Debug|Any CPU.Build.0 = Debug|Any CPU {27CDB869-A150-4593-958F-6F26E5391E7C}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -633,7 +609,6 @@ Global {BF37BEA1-0816-4326-B1E0-E82290F8FCE0} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {ADC2372B-6FE0-421D-8277-BB628E8EFC22} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {596EAFC1-0496-495C-B382-D57415FA456A} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} - {464F1120-A0DA-462B-B9E8-45176D883625} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {8AB91636-9055-4900-A72A-7CFFACDFDBF0} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {E6642255-667D-476B-B584-089AA5E6C0B1} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {27D46863-65B9-4934-B3C8-2383B217A477} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} @@ -641,7 +616,6 @@ Global {F6394475-D6F1-46E2-81BF-4BA78A40B878} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {BFDA179A-40EB-4CEB-B8E9-0DF32C65E2C5} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {45D6F69C-4D87-4130-AA90-0DB2F7460DAE} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} - {C95A3B2F-2B28-49A7-8806-731C158BBC21} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {64A87DE5-29B0-4A54-9E74-560484D8C7C0} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {380BB29B-F556-404D-B13B-CA250599C565} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {84911C93-C2A9-46E9-AE5E-D567306589E5} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} @@ -681,7 +655,6 @@ Global {87A3F137-6DC3-4CE5-91E6-01797D076086} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {D3F63405-C0FA-4F83-8B79-E30BFF5FF5BF} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {4AC1088B-9965-4497-AC8E-570F1AD5631F} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} - {904C8476-FCEF-41F0-8948-9EFA7C08712E} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {DA1D7ADE-452C-4369-83CC-56289176EACD} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {3E55CBE8-AFE8-426D-9470-49D63CD1051C} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {56D0DCA5-567F-4B3B-8B79-CB108F8EB8A6} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} @@ -692,7 +665,6 @@ Global {31EE94A0-E721-4073-B6F1-DD912D004DEF} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {867BD04E-4670-4FBA-98D5-9F83220E6DFB} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {9E8E6AA5-65D1-498F-BEAB-BA34723A0050} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} - {1A1983E6-5297-435F-B467-E8E1F11277D6} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {27CDB869-A150-4593-958F-6F26E5391E7C} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {EBA72C3B-57D5-43FF-A5B4-3D55B3B6D4C2} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {E901DF14-6F05-4FC2-825A-3055FAD33561} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} diff --git a/docs/modules/index.md b/docs/modules/index.md index 38e925ce5..00de47323 100644 --- a/docs/modules/index.md +++ b/docs/modules/index.md @@ -24,7 +24,6 @@ await moduleNameContainer.StartAsync(); | ActiveMQ Artemis | `apache/activemq-artemis:2.31.2` | [NuGet](https://www.nuget.org/packages/Testcontainers.ActiveMq) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.ActiveMq) | | ArangoDB | `arangodb:3.11.5` | [NuGet](https://www.nuget.org/packages/Testcontainers.ArangoDb) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.ArangoDb) | | Azure Cosmos DB | `mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest` | [NuGet](https://www.nuget.org/packages/Testcontainers.CosmosDb) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.CosmosDb) | -| Azure SQL Edge | `mcr.microsoft.com/azure-sql-edge:1.0.7` | [NuGet](https://www.nuget.org/packages/Testcontainers.SqlEdge) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.SqlEdge) | | Azurite | `mcr.microsoft.com/azure-storage/azurite:3.24.0` | [NuGet](https://www.nuget.org/packages/Testcontainers.Azurite) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.Azurite) | | BigQuery | `ghcr.io/goccy/bigquery-emulator:0.4` | [NuGet](https://www.nuget.org/packages/Testcontainers.BigQuery) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.BigQuery) | | Bigtable | `gcr.io/google.com/cloudsdktool/google-cloud-cli:446.0.1-emulators` | [NuGet](https://www.nuget.org/packages/Testcontainers.Bigtable) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.Bigtable) | @@ -54,7 +53,6 @@ await moduleNameContainer.StartAsync(); | NATS | `nats:2.9` | [NuGet](https://www.nuget.org/packages/Testcontainers.Nats) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.Nats) | | Neo4j | `neo4j:5.4` | [NuGet](https://www.nuget.org/packages/Testcontainers.Neo4j) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.Neo4j) | | Oracle | `gvenzl/oracle-xe:21.3.0-slim-faststart` | [NuGet](https://www.nuget.org/packages/Testcontainers.Oracle) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.Oracle) | -| Papercut | `jijiechen/papercut:latest` | [NuGet](https://www.nuget.org/packages/Testcontainers.Papercut) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.Papercut) | | PostgreSQL | `postgres:15.1` | [NuGet](https://www.nuget.org/packages/Testcontainers.PostgreSql) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.PostgreSql) | | PubSub | `gcr.io/google.com/cloudsdktool/google-cloud-cli:446.0.1-emulators` | [NuGet](https://www.nuget.org/packages/Testcontainers.PubSub) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.PubSub) | | Pulsar | `apachepulsar/pulsar:3.0.6` | [NuGet](https://www.nuget.org/packages/Testcontainers.Pulsar) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.Pulsar) | @@ -62,7 +60,7 @@ await moduleNameContainer.StartAsync(); | RavenDB | `ravendb/ravendb:5.4-ubuntu-latest` | [NuGet](https://www.nuget.org/packages/Testcontainers.RavenDb) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.RavenDb) | | Redis | `redis:7.0` | [NuGet](https://www.nuget.org/packages/Testcontainers.Redis) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.Redis) | | Redpanda | `docker.redpanda.com/redpandadata/redpanda:v22.2.1` | [NuGet](https://www.nuget.org/packages/Testcontainers.Redpanda) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.Redpanda) | -| SQL Server | `mcr.microsoft.com/mssql/server:2019-CU18-ubuntu-20.04` | [NuGet](https://www.nuget.org/packages/Testcontainers.MsSql) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.MsSql) | +| SQL Server | `mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04` | [NuGet](https://www.nuget.org/packages/Testcontainers.MsSql) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.MsSql) | | WebDriver | `selenium/standalone-chrome:110.0` | [NuGet](https://www.nuget.org/packages/Testcontainers.WebDriver) | [Source](https://github.com/testcontainers/testcontainers-dotnet/tree/develop/src/Testcontainers.WebDriver) | ## Implement a module diff --git a/src/Testcontainers.MsSql/MsSqlBuilder.cs b/src/Testcontainers.MsSql/MsSqlBuilder.cs index 270d19cad..7a5481f6b 100644 --- a/src/Testcontainers.MsSql/MsSqlBuilder.cs +++ b/src/Testcontainers.MsSql/MsSqlBuilder.cs @@ -4,7 +4,7 @@ namespace Testcontainers.MsSql; [PublicAPI] public sealed class MsSqlBuilder : ContainerBuilder { - public const string MsSqlImage = "mcr.microsoft.com/mssql/server:2019-CU18-ubuntu-20.04"; + public const string MsSqlImage = "mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04"; public const ushort MsSqlPort = 1433; diff --git a/src/Testcontainers.Papercut/.editorconfig b/src/Testcontainers.Papercut/.editorconfig deleted file mode 100644 index 6f066619d..000000000 --- a/src/Testcontainers.Papercut/.editorconfig +++ /dev/null @@ -1 +0,0 @@ -root = true \ No newline at end of file diff --git a/src/Testcontainers.Papercut/PapercutBuilder.cs b/src/Testcontainers.Papercut/PapercutBuilder.cs deleted file mode 100644 index c0202b818..000000000 --- a/src/Testcontainers.Papercut/PapercutBuilder.cs +++ /dev/null @@ -1,69 +0,0 @@ -namespace Testcontainers.Papercut; - -/// -[PublicAPI] -public sealed class PapercutBuilder : ContainerBuilder -{ - public const string PapercutImage = "jijiechen/papercut:latest"; - - public const ushort HttpPort = 37408; - - public const ushort SmtpPort = 25; - - /// - /// Initializes a new instance of the class. - /// - public PapercutBuilder() - : this(new PapercutConfiguration()) - { - DockerResourceConfiguration = Init().DockerResourceConfiguration; - } - - /// - /// Initializes a new instance of the class. - /// - /// The Docker resource configuration. - private PapercutBuilder(PapercutConfiguration resourceConfiguration) - : base(resourceConfiguration) - { - DockerResourceConfiguration = resourceConfiguration; - } - - /// - protected override PapercutConfiguration DockerResourceConfiguration { get; } - - /// - public override PapercutContainer Build() - { - Validate(); - return new PapercutContainer(DockerResourceConfiguration); - } - - /// - protected override PapercutBuilder Init() - { - return base.Init() - .WithImage(PapercutImage) - .WithPortBinding(HttpPort, true) - .WithPortBinding(SmtpPort, true) - .WithWaitStrategy(Wait.ForUnixContainer().UntilMessageIsLogged("Now listening on")); - } - - /// - protected override PapercutBuilder Clone(IResourceConfiguration resourceConfiguration) - { - return Merge(DockerResourceConfiguration, new PapercutConfiguration(resourceConfiguration)); - } - - /// - protected override PapercutBuilder Clone(IContainerConfiguration resourceConfiguration) - { - return Merge(DockerResourceConfiguration, new PapercutConfiguration(resourceConfiguration)); - } - - /// - protected override PapercutBuilder Merge(PapercutConfiguration oldValue, PapercutConfiguration newValue) - { - return new PapercutBuilder(new PapercutConfiguration(oldValue, newValue)); - } -} \ No newline at end of file diff --git a/src/Testcontainers.Papercut/PapercutConfiguration.cs b/src/Testcontainers.Papercut/PapercutConfiguration.cs deleted file mode 100644 index 6582a0276..000000000 --- a/src/Testcontainers.Papercut/PapercutConfiguration.cs +++ /dev/null @@ -1,53 +0,0 @@ -namespace Testcontainers.Papercut; - -/// -[PublicAPI] -public sealed class PapercutConfiguration : ContainerConfiguration -{ - /// - /// Initializes a new instance of the class. - /// - public PapercutConfiguration() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The Docker resource configuration. - public PapercutConfiguration(IResourceConfiguration resourceConfiguration) - : base(resourceConfiguration) - { - // Passes the configuration upwards to the base implementations to create an updated immutable copy. - } - - /// - /// Initializes a new instance of the class. - /// - /// The Docker resource configuration. - public PapercutConfiguration(IContainerConfiguration resourceConfiguration) - : base(resourceConfiguration) - { - // Passes the configuration upwards to the base implementations to create an updated immutable copy. - } - - /// - /// Initializes a new instance of the class. - /// - /// The Docker resource configuration. - public PapercutConfiguration(PapercutConfiguration resourceConfiguration) - : this(new PapercutConfiguration(), resourceConfiguration) - { - // Passes the configuration upwards to the base implementations to create an updated immutable copy. - } - - /// - /// Initializes a new instance of the class. - /// - /// The old Docker resource configuration. - /// The new Docker resource configuration. - public PapercutConfiguration(PapercutConfiguration oldValue, PapercutConfiguration newValue) - : base(oldValue, newValue) - { - } -} \ No newline at end of file diff --git a/src/Testcontainers.Papercut/PapercutContainer.cs b/src/Testcontainers.Papercut/PapercutContainer.cs deleted file mode 100644 index 2ad934865..000000000 --- a/src/Testcontainers.Papercut/PapercutContainer.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace Testcontainers.Papercut; - -/// -[PublicAPI] -public sealed class PapercutContainer : DockerContainer -{ - /// - /// Initializes a new instance of the class. - /// - /// The container configuration. - public PapercutContainer(PapercutConfiguration configuration) - : base(configuration) - { - } - - /// - /// Gets the SMTP port. - /// - public ushort SmtpPort => GetMappedPublicPort(PapercutBuilder.SmtpPort); - - /// - /// Gets the Papercut base address. - /// - /// The Papercut base address. - public string GetBaseAddress() - { - return new UriBuilder(Uri.UriSchemeHttp, Hostname, GetMappedPublicPort(PapercutBuilder.HttpPort)).ToString(); - } -} \ No newline at end of file diff --git a/src/Testcontainers.Papercut/Testcontainers.Papercut.csproj b/src/Testcontainers.Papercut/Testcontainers.Papercut.csproj deleted file mode 100644 index 8b2ed72c6..000000000 --- a/src/Testcontainers.Papercut/Testcontainers.Papercut.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - net6.0;net8.0;netstandard2.0;netstandard2.1 - latest - - - - - - - - \ No newline at end of file diff --git a/src/Testcontainers.Papercut/Usings.cs b/src/Testcontainers.Papercut/Usings.cs deleted file mode 100644 index 79fd3af9b..000000000 --- a/src/Testcontainers.Papercut/Usings.cs +++ /dev/null @@ -1,6 +0,0 @@ -global using System; -global using Docker.DotNet.Models; -global using DotNet.Testcontainers.Builders; -global using DotNet.Testcontainers.Configurations; -global using DotNet.Testcontainers.Containers; -global using JetBrains.Annotations; \ No newline at end of file diff --git a/src/Testcontainers.SqlEdge/.editorconfig b/src/Testcontainers.SqlEdge/.editorconfig deleted file mode 100644 index 6f066619d..000000000 --- a/src/Testcontainers.SqlEdge/.editorconfig +++ /dev/null @@ -1 +0,0 @@ -root = true \ No newline at end of file diff --git a/src/Testcontainers.SqlEdge/SqlEdgeBuilder.cs b/src/Testcontainers.SqlEdge/SqlEdgeBuilder.cs deleted file mode 100644 index 5c2b0d123..000000000 --- a/src/Testcontainers.SqlEdge/SqlEdgeBuilder.cs +++ /dev/null @@ -1,123 +0,0 @@ -namespace Testcontainers.SqlEdge; - -/// -[PublicAPI] -public sealed class SqlEdgeBuilder : ContainerBuilder -{ - public const string SqlEdgeImage = "mcr.microsoft.com/azure-sql-edge:1.0.7"; - - public const ushort SqlEdgePort = 1433; - - public const string DefaultDatabase = "master"; - - public const string DefaultUsername = "sa"; - - public const string DefaultPassword = "yourStrong(!)Password"; - - /// - /// Initializes a new instance of the class. - /// - public SqlEdgeBuilder() - : this(new SqlEdgeConfiguration()) - { - DockerResourceConfiguration = Init().DockerResourceConfiguration; - } - - /// - /// Initializes a new instance of the class. - /// - /// The Docker resource configuration. - private SqlEdgeBuilder(SqlEdgeConfiguration resourceConfiguration) - : base(resourceConfiguration) - { - DockerResourceConfiguration = resourceConfiguration; - } - - /// - protected override SqlEdgeConfiguration DockerResourceConfiguration { get; } - - /// - /// Sets the SqlEdge password. - /// - /// The SqlEdge password. - /// A configured instance of . - public SqlEdgeBuilder WithPassword(string password) - { - return Merge(DockerResourceConfiguration, new SqlEdgeConfiguration(password: password)) - .WithEnvironment("MSSQL_SA_PASSWORD", password); - } - - /// - public override SqlEdgeContainer Build() - { - Validate(); - return new SqlEdgeContainer(DockerResourceConfiguration); - } - - /// - protected override SqlEdgeBuilder Init() - { - return base.Init() - .WithImage(SqlEdgeImage) - .WithPortBinding(SqlEdgePort, true) - .WithEnvironment("ACCEPT_EULA", "Y") - .WithDatabase(DefaultDatabase) - .WithUsername(DefaultUsername) - .WithPassword(DefaultPassword) - .WithWaitStrategy(Wait.ForUnixContainer().UntilMessageIsLogged("Recovery is complete.")); - } - - /// - protected override void Validate() - { - base.Validate(); - - _ = Guard.Argument(DockerResourceConfiguration.Password, nameof(DockerResourceConfiguration.Password)) - .NotNull() - .NotEmpty(); - } - - /// - protected override SqlEdgeBuilder Clone(IResourceConfiguration resourceConfiguration) - { - return Merge(DockerResourceConfiguration, new SqlEdgeConfiguration(resourceConfiguration)); - } - - /// - protected override SqlEdgeBuilder Clone(IContainerConfiguration resourceConfiguration) - { - return Merge(DockerResourceConfiguration, new SqlEdgeConfiguration(resourceConfiguration)); - } - - /// - protected override SqlEdgeBuilder Merge(SqlEdgeConfiguration oldValue, SqlEdgeConfiguration newValue) - { - return new SqlEdgeBuilder(new SqlEdgeConfiguration(oldValue, newValue)); - } - - /// - /// Sets the SqlEdge database. - /// - /// - /// The Docker image does not allow to configure the database. - /// - /// The SqlEdge database. - /// A configured instance of . - private SqlEdgeBuilder WithDatabase(string database) - { - return Merge(DockerResourceConfiguration, new SqlEdgeConfiguration(database: database)); - } - - /// - /// Sets the SqlEdge username. - /// - /// - /// The Docker image does not allow to configure the username. - /// - /// The SqlEdge username. - /// A configured instance of . - private SqlEdgeBuilder WithUsername(string username) - { - return Merge(DockerResourceConfiguration, new SqlEdgeConfiguration(username: username)); - } -} \ No newline at end of file diff --git a/src/Testcontainers.SqlEdge/SqlEdgeConfiguration.cs b/src/Testcontainers.SqlEdge/SqlEdgeConfiguration.cs deleted file mode 100644 index 636442473..000000000 --- a/src/Testcontainers.SqlEdge/SqlEdgeConfiguration.cs +++ /dev/null @@ -1,80 +0,0 @@ -namespace Testcontainers.SqlEdge; - -/// -[PublicAPI] -public sealed class SqlEdgeConfiguration : ContainerConfiguration -{ - /// - /// Initializes a new instance of the class. - /// - /// The SqlEdge database. - /// The SqlEdge username. - /// The SqlEdge password. - public SqlEdgeConfiguration( - string database = null, - string username = null, - string password = null) - { - Database = database; - Username = username; - Password = password; - } - - /// - /// Initializes a new instance of the class. - /// - /// The Docker resource configuration. - public SqlEdgeConfiguration(IResourceConfiguration resourceConfiguration) - : base(resourceConfiguration) - { - // Passes the configuration upwards to the base implementations to create an updated immutable copy. - } - - /// - /// Initializes a new instance of the class. - /// - /// The Docker resource configuration. - public SqlEdgeConfiguration(IContainerConfiguration resourceConfiguration) - : base(resourceConfiguration) - { - // Passes the configuration upwards to the base implementations to create an updated immutable copy. - } - - /// - /// Initializes a new instance of the class. - /// - /// The Docker resource configuration. - public SqlEdgeConfiguration(SqlEdgeConfiguration resourceConfiguration) - : this(new SqlEdgeConfiguration(), resourceConfiguration) - { - // Passes the configuration upwards to the base implementations to create an updated immutable copy. - } - - /// - /// Initializes a new instance of the class. - /// - /// The old Docker resource configuration. - /// The new Docker resource configuration. - public SqlEdgeConfiguration(SqlEdgeConfiguration oldValue, SqlEdgeConfiguration newValue) - : base(oldValue, newValue) - { - Database = BuildConfiguration.Combine(oldValue.Database, newValue.Database); - Username = BuildConfiguration.Combine(oldValue.Username, newValue.Username); - Password = BuildConfiguration.Combine(oldValue.Password, newValue.Password); - } - - /// - /// Gets the SqlEdge database. - /// - public string Database { get; } - - /// - /// Gets the SqlEdge username. - /// - public string Username { get; } - - /// - /// Gets the SqlEdge password. - /// - public string Password { get; } -} \ No newline at end of file diff --git a/src/Testcontainers.SqlEdge/SqlEdgeContainer.cs b/src/Testcontainers.SqlEdge/SqlEdgeContainer.cs deleted file mode 100644 index d26157cdd..000000000 --- a/src/Testcontainers.SqlEdge/SqlEdgeContainer.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace Testcontainers.SqlEdge; - -/// -[PublicAPI] -public sealed class SqlEdgeContainer : DockerContainer, IDatabaseContainer -{ - private readonly SqlEdgeConfiguration _configuration; - - /// - /// Initializes a new instance of the class. - /// - /// The container configuration. - public SqlEdgeContainer(SqlEdgeConfiguration configuration) - : base(configuration) - { - _configuration = configuration; - } - - /// - /// Gets the SqlEdge connection string. - /// - /// The SqlEdge connection string. - public string GetConnectionString() - { - var properties = new Dictionary(); - properties.Add("Server", Hostname + "," + GetMappedPublicPort(SqlEdgeBuilder.SqlEdgePort)); - properties.Add("Database", _configuration.Database); - properties.Add("User Id", _configuration.Username); - properties.Add("Password", _configuration.Password); - properties.Add("TrustServerCertificate", bool.TrueString); - return string.Join(";", properties.Select(property => string.Join("=", property.Key, property.Value))); - } -} \ No newline at end of file diff --git a/src/Testcontainers.SqlEdge/Testcontainers.SqlEdge.csproj b/src/Testcontainers.SqlEdge/Testcontainers.SqlEdge.csproj deleted file mode 100644 index 8b2ed72c6..000000000 --- a/src/Testcontainers.SqlEdge/Testcontainers.SqlEdge.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - net6.0;net8.0;netstandard2.0;netstandard2.1 - latest - - - - - - - - \ No newline at end of file diff --git a/src/Testcontainers.SqlEdge/Usings.cs b/src/Testcontainers.SqlEdge/Usings.cs deleted file mode 100644 index d0d26d7b2..000000000 --- a/src/Testcontainers.SqlEdge/Usings.cs +++ /dev/null @@ -1,8 +0,0 @@ -global using System.Collections.Generic; -global using System.Linq; -global using Docker.DotNet.Models; -global using DotNet.Testcontainers; -global using DotNet.Testcontainers.Builders; -global using DotNet.Testcontainers.Configurations; -global using DotNet.Testcontainers.Containers; -global using JetBrains.Annotations; \ No newline at end of file diff --git a/tests/Testcontainers.MsSql.Tests/MsSqlContainerTest.cs b/tests/Testcontainers.MsSql.Tests/MsSqlContainerTest.cs index 64e15d2aa..36a144af4 100644 --- a/tests/Testcontainers.MsSql.Tests/MsSqlContainerTest.cs +++ b/tests/Testcontainers.MsSql.Tests/MsSqlContainerTest.cs @@ -61,13 +61,4 @@ public MsSqlDefaultConfiguration() } } // # --8<-- [end:CreateMsSqlContainer] - - [UsedImplicitly] - public sealed class MsSqlTools18Configuration : MsSqlContainerTest - { - public MsSqlTools18Configuration() - : base(new MsSqlBuilder().WithImage("mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04").Build()) - { - } - } } \ No newline at end of file diff --git a/tests/Testcontainers.Papercut.Tests/.editorconfig b/tests/Testcontainers.Papercut.Tests/.editorconfig deleted file mode 100644 index 6f066619d..000000000 --- a/tests/Testcontainers.Papercut.Tests/.editorconfig +++ /dev/null @@ -1 +0,0 @@ -root = true \ No newline at end of file diff --git a/tests/Testcontainers.Papercut.Tests/PapercutContainerTest.cs b/tests/Testcontainers.Papercut.Tests/PapercutContainerTest.cs deleted file mode 100644 index 6feba9c73..000000000 --- a/tests/Testcontainers.Papercut.Tests/PapercutContainerTest.cs +++ /dev/null @@ -1,72 +0,0 @@ -namespace Testcontainers.Papercut; - -public sealed class PapercutContainerTest : IAsyncLifetime -{ - private readonly PapercutContainer _papercutContainer = new PapercutBuilder().Build(); - - public Task InitializeAsync() - { - return _papercutContainer.StartAsync(); - } - - public Task DisposeAsync() - { - return _papercutContainer.DisposeAsync().AsTask(); - } - - [Fact] - [Trait(nameof(DockerCli.DockerPlatform), nameof(DockerCli.DockerPlatform.Linux))] - public async Task ReceivesSentMessage() - { - // Given - const string subject = "Test"; - - Message[] messages; - - using var httpClient = new HttpClient(); - httpClient.BaseAddress = new Uri(_papercutContainer.GetBaseAddress()); - - using var smtpClient = new SmtpClient(_papercutContainer.Hostname, _papercutContainer.SmtpPort); - - // When - smtpClient.Send("from@example.com", "to@example.com", subject, "A test message"); - - do - { - var messagesJson = await httpClient.GetStringAsync("/api/messages") - .ConfigureAwait(true); - - var jsonDocument = JsonDocument.Parse(messagesJson); - messages = jsonDocument.RootElement.GetProperty("messages").Deserialize(); - } - while (messages.Length == 0); - - // Then - Assert.NotEmpty(messages); - Assert.Equal(subject, messages[0].Subject); - } - - private readonly struct Message - { - [JsonConstructor] - public Message(string id, string subject, string size, DateTime createdAt) - { - Id = id; - Subject = subject; - Size = size; - CreatedAt = createdAt; - } - - [JsonPropertyName("id")] - public string Id { get; } - - [JsonPropertyName("subject")] - public string Subject { get; } - - [JsonPropertyName("size")] - public string Size { get; } - - [JsonPropertyName("createdAt")] - public DateTime CreatedAt { get; } - } -} \ No newline at end of file diff --git a/tests/Testcontainers.Papercut.Tests/Testcontainers.Papercut.Tests.csproj b/tests/Testcontainers.Papercut.Tests/Testcontainers.Papercut.Tests.csproj deleted file mode 100644 index 485fcc0f8..000000000 --- a/tests/Testcontainers.Papercut.Tests/Testcontainers.Papercut.Tests.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - net8.0 - false - false - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/Testcontainers.Papercut.Tests/Usings.cs b/tests/Testcontainers.Papercut.Tests/Usings.cs deleted file mode 100644 index 763582fff..000000000 --- a/tests/Testcontainers.Papercut.Tests/Usings.cs +++ /dev/null @@ -1,8 +0,0 @@ -global using System; -global using System.Net.Http; -global using System.Net.Mail; -global using System.Text.Json; -global using System.Text.Json.Serialization; -global using System.Threading.Tasks; -global using DotNet.Testcontainers.Commons; -global using Xunit; \ No newline at end of file diff --git a/tests/Testcontainers.SqlEdge.Tests/.editorconfig b/tests/Testcontainers.SqlEdge.Tests/.editorconfig deleted file mode 100644 index 6f066619d..000000000 --- a/tests/Testcontainers.SqlEdge.Tests/.editorconfig +++ /dev/null @@ -1 +0,0 @@ -root = true \ No newline at end of file diff --git a/tests/Testcontainers.SqlEdge.Tests/SqlEdgeContainerTest.cs b/tests/Testcontainers.SqlEdge.Tests/SqlEdgeContainerTest.cs deleted file mode 100644 index b7bb8925f..000000000 --- a/tests/Testcontainers.SqlEdge.Tests/SqlEdgeContainerTest.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace Testcontainers.SqlEdge; - -public sealed class SqlEdgeContainerTest : IAsyncLifetime -{ - private readonly SqlEdgeContainer _sqlEdgeContainer = new SqlEdgeBuilder().Build(); - - public Task InitializeAsync() - { - return _sqlEdgeContainer.StartAsync(); - } - - public Task DisposeAsync() - { - return _sqlEdgeContainer.DisposeAsync().AsTask(); - } - - [Fact] - [Trait(nameof(DockerCli.DockerPlatform), nameof(DockerCli.DockerPlatform.Linux))] - public void ConnectionStateReturnsOpen() - { - // Given - using DbConnection connection = new SqlConnection(_sqlEdgeContainer.GetConnectionString()); - - // When - connection.Open(); - - // Then - Assert.Equal(ConnectionState.Open, connection.State); - } -} \ No newline at end of file diff --git a/tests/Testcontainers.SqlEdge.Tests/Testcontainers.SqlEdge.Tests.csproj b/tests/Testcontainers.SqlEdge.Tests/Testcontainers.SqlEdge.Tests.csproj deleted file mode 100644 index 043732878..000000000 --- a/tests/Testcontainers.SqlEdge.Tests/Testcontainers.SqlEdge.Tests.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - net8.0 - false - false - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/Testcontainers.SqlEdge.Tests/Usings.cs b/tests/Testcontainers.SqlEdge.Tests/Usings.cs deleted file mode 100644 index 02acb4398..000000000 --- a/tests/Testcontainers.SqlEdge.Tests/Usings.cs +++ /dev/null @@ -1,6 +0,0 @@ -global using System.Data; -global using System.Data.Common; -global using System.Threading.Tasks; -global using DotNet.Testcontainers.Commons; -global using Microsoft.Data.SqlClient; -global using Xunit; \ No newline at end of file