diff --git a/Testcontainers.sln b/Testcontainers.sln index b8e81f59e..30abbbec5 100644 --- a/Testcontainers.sln +++ b/Testcontainers.sln @@ -52,8 +52,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Elasticsearc EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.EventHubs", "src\Testcontainers.EventHubs\Testcontainers.EventHubs.csproj", "{0EF885E9-E973-47DC-AA9C-3A5E9175B0F3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.EventStoreDb", "src\Testcontainers.EventStoreDb\Testcontainers.EventStoreDb.csproj", "{84D707E0-C9FA-4327-85DC-0AFEBEA73572}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.FakeGcsServer", "src\Testcontainers.FakeGcsServer\Testcontainers.FakeGcsServer.csproj", "{FF86B509-2F9E-4269-ABC2-912B3339DE29}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.FirebirdSql", "src\Testcontainers.FirebirdSql\Testcontainers.FirebirdSql.csproj", "{31BAF2C4-0608-4C0F-845A-14FE7C0A1670}" @@ -180,8 +178,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Elasticsearc EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.EventHubs.Tests", "tests\Testcontainers.EventHubs.Tests\Testcontainers.EventHubs.Tests.csproj", "{4A0C5523-CEB2-49C9-AE62-9187A01B016B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.EventStoreDb.Tests", "tests\Testcontainers.EventStoreDb.Tests\Testcontainers.EventStoreDb.Tests.csproj", "{64F8E9B9-78FD-4E13-BDDF-0340E2D4E1D0}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.FakeGcsServer.Tests", "tests\Testcontainers.FakeGcsServer.Tests\Testcontainers.FakeGcsServer.Tests.csproj", "{9F27AA1B-C25D-400C-BCB0-6B0BF1A1DCEA}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.FirebirdSql.Tests", "tests\Testcontainers.FirebirdSql.Tests\Testcontainers.FirebirdSql.Tests.csproj", "{E39095AC-9B34-4178-A486-04C902B6FD33}" @@ -354,10 +350,6 @@ Global {0EF885E9-E973-47DC-AA9C-3A5E9175B0F3}.Debug|Any CPU.Build.0 = Debug|Any CPU {0EF885E9-E973-47DC-AA9C-3A5E9175B0F3}.Release|Any CPU.ActiveCfg = Release|Any CPU {0EF885E9-E973-47DC-AA9C-3A5E9175B0F3}.Release|Any CPU.Build.0 = Release|Any CPU - {84D707E0-C9FA-4327-85DC-0AFEBEA73572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {84D707E0-C9FA-4327-85DC-0AFEBEA73572}.Debug|Any CPU.Build.0 = Debug|Any CPU - {84D707E0-C9FA-4327-85DC-0AFEBEA73572}.Release|Any CPU.ActiveCfg = Release|Any CPU - {84D707E0-C9FA-4327-85DC-0AFEBEA73572}.Release|Any CPU.Build.0 = Release|Any CPU {FF86B509-2F9E-4269-ABC2-912B3339DE29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FF86B509-2F9E-4269-ABC2-912B3339DE29}.Debug|Any CPU.Build.0 = Debug|Any CPU {FF86B509-2F9E-4269-ABC2-912B3339DE29}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -610,10 +602,6 @@ Global {4A0C5523-CEB2-49C9-AE62-9187A01B016B}.Debug|Any CPU.Build.0 = Debug|Any CPU {4A0C5523-CEB2-49C9-AE62-9187A01B016B}.Release|Any CPU.ActiveCfg = Release|Any CPU {4A0C5523-CEB2-49C9-AE62-9187A01B016B}.Release|Any CPU.Build.0 = Release|Any CPU - {64F8E9B9-78FD-4E13-BDDF-0340E2D4E1D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {64F8E9B9-78FD-4E13-BDDF-0340E2D4E1D0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {64F8E9B9-78FD-4E13-BDDF-0340E2D4E1D0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {64F8E9B9-78FD-4E13-BDDF-0340E2D4E1D0}.Release|Any CPU.Build.0 = Release|Any CPU {9F27AA1B-C25D-400C-BCB0-6B0BF1A1DCEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9F27AA1B-C25D-400C-BCB0-6B0BF1A1DCEA}.Debug|Any CPU.Build.0 = Debug|Any CPU {9F27AA1B-C25D-400C-BCB0-6B0BF1A1DCEA}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -840,7 +828,6 @@ Global {2EAFA567-9F68-4C52-9DBC-8F3EC11BB2CE} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {641DDEA5-B6E0-41E6-BA11-7A28C0913127} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {0EF885E9-E973-47DC-AA9C-3A5E9175B0F3} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} - {84D707E0-C9FA-4327-85DC-0AFEBEA73572} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {FF86B509-2F9E-4269-ABC2-912B3339DE29} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {31BAF2C4-0608-4C0F-845A-14FE7C0A1670} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} {B3CC460D-0DFD-48A8-9502-54E9828B7B05} = {673F23AE-7694-4BB9-ABD4-136D6C13634E} @@ -904,7 +891,6 @@ Global {101515E6-74C1-40F9-85C8-871F742A378D} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {DD5B3678-468F-4D73-AECE-705E3D66CD43} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {4A0C5523-CEB2-49C9-AE62-9187A01B016B} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} - {64F8E9B9-78FD-4E13-BDDF-0340E2D4E1D0} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {9F27AA1B-C25D-400C-BCB0-6B0BF1A1DCEA} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {E39095AC-9B34-4178-A486-04C902B6FD33} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} {2F0D7CD6-7EA9-46FC-B8F2-25D55699525F} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF} diff --git a/src/Testcontainers.EventStoreDb/.editorconfig b/src/Testcontainers.EventStoreDb/.editorconfig deleted file mode 100644 index 6f066619d..000000000 --- a/src/Testcontainers.EventStoreDb/.editorconfig +++ /dev/null @@ -1 +0,0 @@ -root = true \ No newline at end of file diff --git a/src/Testcontainers.EventStoreDb/EventStoreDbBuilder.cs b/src/Testcontainers.EventStoreDb/EventStoreDbBuilder.cs deleted file mode 100644 index 94bf5046f..000000000 --- a/src/Testcontainers.EventStoreDb/EventStoreDbBuilder.cs +++ /dev/null @@ -1,102 +0,0 @@ -namespace Testcontainers.EventStoreDb; - -/// -[PublicAPI] -[Obsolete("Use KurrentDB instead of the EventStoreDB module. More info: https://www.kurrent.io/blog/kurrent-re-brand-faq.")] -public sealed class EventStoreDbBuilder : ContainerBuilder -{ - [Obsolete("This constant is obsolete and will be removed in the future. Use the constructor with the image parameter instead: https://github.com/testcontainers/testcontainers-dotnet/discussions/1470#discussioncomment-15185721.")] - public const string EventStoreDbImage = "eventstore/eventstore:22.10.1-buster-slim"; - - public const ushort EventStoreDbPort = 2113; - - /// - /// Initializes a new instance of the class. - /// - [Obsolete("This parameterless constructor is obsolete and will be removed. Use the constructor with the image parameter instead: https://github.com/testcontainers/testcontainers-dotnet/discussions/1470#discussioncomment-15185721.")] - public EventStoreDbBuilder() - : this(EventStoreDbImage) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - /// The full Docker image name, including the image repository and tag - /// (e.g., eventstore/eventstore:22.10.1-buster-slim). - /// - /// - /// Docker image tags available at . - /// - public EventStoreDbBuilder(string image) - : this(new EventStoreDbConfiguration()) - { - DockerResourceConfiguration = Init().WithImage(image).DockerResourceConfiguration; - } - - /// - /// Initializes a new instance of the class. - /// - /// - /// An instance that specifies the Docker image to be used - /// for the container builder configuration. - /// - /// - /// Docker image tags available at . - /// - public EventStoreDbBuilder(IImage image) - : this(new EventStoreDbConfiguration()) - { - DockerResourceConfiguration = Init().WithImage(image).DockerResourceConfiguration; - } - - /// - /// Initializes a new instance of the class. - /// - /// The Docker resource configuration. - private EventStoreDbBuilder(EventStoreDbConfiguration resourceConfiguration) - : base(resourceConfiguration) - { - DockerResourceConfiguration = resourceConfiguration; - } - - /// - protected override EventStoreDbConfiguration DockerResourceConfiguration { get; } - - /// - public override EventStoreDbContainer Build() - { - return new EventStoreDbContainer(DockerResourceConfiguration); - } - - /// - protected override EventStoreDbBuilder Init() - { - return base.Init() - .WithPortBinding(EventStoreDbPort, true) - .WithEnvironment("EVENTSTORE_CLUSTER_SIZE", "1") - .WithEnvironment("EVENTSTORE_RUN_PROJECTIONS", "All") - .WithEnvironment("EVENTSTORE_START_STANDARD_PROJECTIONS", "true") - .WithEnvironment("EVENTSTORE_INSECURE", "true") - .WithWaitStrategy(Wait.ForUnixContainer().UntilContainerIsHealthy()); - } - - /// - protected override EventStoreDbBuilder Clone(IResourceConfiguration resourceConfiguration) - { - return Merge(DockerResourceConfiguration, new EventStoreDbConfiguration(resourceConfiguration)); - } - - /// - protected override EventStoreDbBuilder Clone(IContainerConfiguration resourceConfiguration) - { - return Merge(DockerResourceConfiguration, new EventStoreDbConfiguration(resourceConfiguration)); - } - - /// - protected override EventStoreDbBuilder Merge(EventStoreDbConfiguration oldValue, EventStoreDbConfiguration newValue) - { - return new EventStoreDbBuilder(new EventStoreDbConfiguration(oldValue, newValue)); - } -} \ No newline at end of file diff --git a/src/Testcontainers.EventStoreDb/EventStoreDbConfiguration.cs b/src/Testcontainers.EventStoreDb/EventStoreDbConfiguration.cs deleted file mode 100644 index c19cd06ba..000000000 --- a/src/Testcontainers.EventStoreDb/EventStoreDbConfiguration.cs +++ /dev/null @@ -1,53 +0,0 @@ -namespace Testcontainers.EventStoreDb; - -/// -[PublicAPI] -public sealed class EventStoreDbConfiguration : ContainerConfiguration -{ - /// - /// Initializes a new instance of the class. - /// - public EventStoreDbConfiguration() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The Docker resource configuration. - public EventStoreDbConfiguration(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 EventStoreDbConfiguration(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 EventStoreDbConfiguration(EventStoreDbConfiguration resourceConfiguration) - : this(new EventStoreDbConfiguration(), 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 EventStoreDbConfiguration(EventStoreDbConfiguration oldValue, EventStoreDbConfiguration newValue) - : base(oldValue, newValue) - { - } -} \ No newline at end of file diff --git a/src/Testcontainers.EventStoreDb/EventStoreDbContainer.cs b/src/Testcontainers.EventStoreDb/EventStoreDbContainer.cs deleted file mode 100644 index 6d0ddc347..000000000 --- a/src/Testcontainers.EventStoreDb/EventStoreDbContainer.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace Testcontainers.EventStoreDb; - -/// -[PublicAPI] -public sealed class EventStoreDbContainer : DockerContainer -{ - /// - /// Initializes a new instance of the class. - /// - /// The container configuration. - public EventStoreDbContainer(EventStoreDbConfiguration configuration) - : base(configuration) - { - } - - /// - /// Gets the EventStoreDb connection string. - /// - /// The EventStoreDb connection string. - public string GetConnectionString() - { - var endpoint = new UriBuilder("esdb", Hostname, GetMappedPublicPort(EventStoreDbBuilder.EventStoreDbPort)); - endpoint.Query = "tls=false"; - return endpoint.ToString(); - } -} \ No newline at end of file diff --git a/src/Testcontainers.EventStoreDb/Testcontainers.EventStoreDb.csproj b/src/Testcontainers.EventStoreDb/Testcontainers.EventStoreDb.csproj deleted file mode 100644 index 6f204b739..000000000 --- a/src/Testcontainers.EventStoreDb/Testcontainers.EventStoreDb.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - net8.0;net9.0;net10.0;netstandard2.0;netstandard2.1 - latest - - - - - - - - \ No newline at end of file diff --git a/src/Testcontainers.EventStoreDb/Usings.cs b/src/Testcontainers.EventStoreDb/Usings.cs deleted file mode 100644 index 26427f77f..000000000 --- a/src/Testcontainers.EventStoreDb/Usings.cs +++ /dev/null @@ -1,7 +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 DotNet.Testcontainers.Images; -global using JetBrains.Annotations; \ No newline at end of file diff --git a/tests/Testcontainers.EventStoreDb.Tests/.editorconfig b/tests/Testcontainers.EventStoreDb.Tests/.editorconfig deleted file mode 100644 index 6f066619d..000000000 --- a/tests/Testcontainers.EventStoreDb.Tests/.editorconfig +++ /dev/null @@ -1 +0,0 @@ -root = true \ No newline at end of file diff --git a/tests/Testcontainers.EventStoreDb.Tests/.runs-on b/tests/Testcontainers.EventStoreDb.Tests/.runs-on deleted file mode 100644 index d0395e498..000000000 --- a/tests/Testcontainers.EventStoreDb.Tests/.runs-on +++ /dev/null @@ -1 +0,0 @@ -ubuntu-24.04 \ No newline at end of file diff --git a/tests/Testcontainers.EventStoreDb.Tests/Dockerfile b/tests/Testcontainers.EventStoreDb.Tests/Dockerfile deleted file mode 100644 index ab46f36df..000000000 --- a/tests/Testcontainers.EventStoreDb.Tests/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM eventstore/eventstore:22.10.1-buster-slim \ No newline at end of file diff --git a/tests/Testcontainers.EventStoreDb.Tests/EventStoreDbContainerTest.cs b/tests/Testcontainers.EventStoreDb.Tests/EventStoreDbContainerTest.cs deleted file mode 100644 index b6357c193..000000000 --- a/tests/Testcontainers.EventStoreDb.Tests/EventStoreDbContainerTest.cs +++ /dev/null @@ -1,45 +0,0 @@ -namespace Testcontainers.EventStoreDb; - -public sealed class EventStoreDbContainerTest : IAsyncLifetime -{ - private readonly EventStoreDbContainer _eventStoreDbContainer = new EventStoreDbBuilder(TestSession.GetImageFromDockerfile()).Build(); - - public async ValueTask InitializeAsync() - { - await _eventStoreDbContainer.StartAsync() - .ConfigureAwait(false); - } - - public ValueTask DisposeAsync() - { - return _eventStoreDbContainer.DisposeAsync(); - } - - [Fact] - [Trait(nameof(DockerCli.DockerPlatform), nameof(DockerCli.DockerPlatform.Linux))] - public async Task ReadStreamReturnsEvent() - { - // Given - const string eventType = "some-event"; - - const string streamName = "some-stream"; - - var settings = EventStoreClientSettings.Create(_eventStoreDbContainer.GetConnectionString()); - - using var client = new EventStoreClient(settings); - - var eventData = new EventData(Uuid.NewUuid(), eventType, Array.Empty()); - - // When - _ = await client.AppendToStreamAsync(streamName, StreamState.NoStream, new[] { eventData }, cancellationToken: TestContext.Current.CancellationToken) - .ConfigureAwait(true); - - var resolvedEvents = client.ReadStreamAsync(Direction.Forwards, streamName, StreamPosition.Start, cancellationToken: TestContext.Current.CancellationToken); - - var resolvedEvent = await resolvedEvents.FirstAsync(cancellationToken: TestContext.Current.CancellationToken) - .ConfigureAwait(true); - - // Then - Assert.Equal(eventType, resolvedEvent.Event.EventType); - } -} \ No newline at end of file diff --git a/tests/Testcontainers.EventStoreDb.Tests/Testcontainers.EventStoreDb.Tests.csproj b/tests/Testcontainers.EventStoreDb.Tests/Testcontainers.EventStoreDb.Tests.csproj deleted file mode 100644 index e2ad0bfa2..000000000 --- a/tests/Testcontainers.EventStoreDb.Tests/Testcontainers.EventStoreDb.Tests.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - net10.0 - false - false - Exe - - - - - - - - - - - - - - - - - PreserveNewest - - - \ No newline at end of file diff --git a/tests/Testcontainers.EventStoreDb.Tests/Usings.cs b/tests/Testcontainers.EventStoreDb.Tests/Usings.cs deleted file mode 100644 index 8660e2560..000000000 --- a/tests/Testcontainers.EventStoreDb.Tests/Usings.cs +++ /dev/null @@ -1,6 +0,0 @@ -global using System; -global using System.Linq; -global using System.Threading.Tasks; -global using DotNet.Testcontainers.Commons; -global using EventStore.Client; -global using Xunit; \ No newline at end of file