Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add LocalStack module #773

Merged
merged 28 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d1bc931
add localstack module
dominikus1993 Feb 10, 2023
02b9f27
rename containers
dominikus1993 Feb 10, 2023
347f001
fix LocalStackConfiguration implementation
dominikus1993 Feb 10, 2023
919da48
fix
dominikus1993 Feb 10, 2023
ff40e27
fix services env names
dominikus1993 Feb 10, 2023
04b042c
add localstack container tests
dominikus1993 Feb 10, 2023
dc2a50d
add custom wait strategy
dominikus1993 Feb 10, 2023
fa2352b
fix unit tests
dominikus1993 Feb 10, 2023
4adc0d6
remove default region and use ssl
dominikus1993 Feb 10, 2023
cd268c9
add sqs, sns, cloudwatchlogs tests
dominikus1993 Feb 10, 2023
67c9396
docs
dominikus1993 Feb 10, 2023
16ce5c3
add documentation to aws service
dominikus1993 Feb 10, 2023
4966cd4
fix
dominikus1993 Feb 10, 2023
fd22a26
remove unecessary validation
dominikus1993 Feb 10, 2023
924c01f
fix serviceNames concatenation
dominikus1993 Feb 10, 2023
52d2208
Merge branch 'develop' into localstack
dominikus1993 Feb 10, 2023
bbc1d6d
remove aws service and use better wait untile policy
dominikus1993 Feb 11, 2023
39b4169
fix namespace
dominikus1993 Feb 11, 2023
6b98055
fix documentation
dominikus1993 Feb 11, 2023
b9ebcfd
fixed aws credentials usage
dominikus1993 Feb 11, 2023
97f4828
remove uneccesary usings
dominikus1993 Feb 11, 2023
7b4d0ef
fix deprecated healthcheck path
dominikus1993 Feb 12, 2023
7d9d0cf
remove external port start and end
dominikus1993 Feb 13, 2023
82bc05d
revert wait until policy
dominikus1993 Feb 13, 2023
793d475
add http request hc
dominikus1993 Feb 13, 2023
362829f
cleanup using
dominikus1993 Feb 13, 2023
1a7cbce
fixes
dominikus1993 Feb 13, 2023
c7fcc69
Merge branch 'develop' into localstack
HofmeisterAn Feb 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions Testcontainers.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Expand All @@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.CouchDb", "s
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.DynamoDb", "src\Testcontainers.DynamoDb\Testcontainers.DynamoDb.csproj", "{2EAFA567-9F68-4C52-9DBC-8F3EC11BB2CE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.LocalStack", "src\Testcontainers.LocalStack\Testcontainers.LocalStack.csproj", "{3792268A-EF08-4569-8118-991E08FD61C4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.MariaDb", "src\Testcontainers.MariaDb\Testcontainers.MariaDb.csproj", "{4B204EB3-C478-422E-9B6F-62DF3871291A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Minio", "src\Testcontainers.Minio\Testcontainers.Minio.csproj", "{1266E1E6-5CEF-4161-8B45-83282455746E}"
Expand All @@ -43,6 +45,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.CouchDb.Test
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.DynamoDb.Tests", "tests\Testcontainers.DynamoDb.Tests\Testcontainers.DynamoDb.Tests.csproj", "{101515E6-74C1-40F9-85C8-871F742A378D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.LocalStack.Tests", "tests\Testcontainers.LocalStack.Tests\Testcontainers.LocalStack.Tests.csproj", "{728CBE16-1D52-4F84-AF01-7229E6013512}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.MariaDb.Tests", "tests\Testcontainers.MariaDb.Tests\Testcontainers.MariaDb.Tests.csproj", "{7F0AE083-9DB8-4BD4-91F7-C199DCC7301D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Testcontainers.Minio.Tests", "tests\Testcontainers.Minio.Tests\Testcontainers.Minio.Tests.csproj", "{5DB1F35F-B714-4B62-84BE-16A33084D3E1}"
Expand Down Expand Up @@ -82,11 +86,15 @@ Global
{DCECB1F6-D9AA-431F-AE42-25D56B9E7DFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DCECB1F6-D9AA-431F-AE42-25D56B9E7DFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DCECB1F6-D9AA-431F-AE42-25D56B9E7DFC}.Release|Any CPU.Build.0 = Release|Any CPU
{2EAFA567-9F68-4C52-9DBC-8F3EC11BB2CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2EAFA567-9F68-4C52-9DBC-8F3EC11BB2CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2EAFA567-9F68-4C52-9DBC-8F3EC11BB2CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2EAFA567-9F68-4C52-9DBC-8F3EC11BB2CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2EAFA567-9F68-4C52-9DBC-8F3EC11BB2CE}.Release|Any CPU.Build.0 = Release|Any CPU
{4B204EB3-C478-422E-9B6F-62DF3871291A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3792268A-EF08-4569-8118-991E08FD61C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3792268A-EF08-4569-8118-991E08FD61C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3792268A-EF08-4569-8118-991E08FD61C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3792268A-EF08-4569-8118-991E08FD61C4}.Release|Any CPU.Build.0 = Release|Any CPU
{4B204EB3-C478-422E-9B6F-62DF3871291A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B204EB3-C478-422E-9B6F-62DF3871291A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B204EB3-C478-422E-9B6F-62DF3871291A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B204EB3-C478-422E-9B6F-62DF3871291A}.Release|Any CPU.Build.0 = Release|Any CPU
Expand Down Expand Up @@ -138,7 +146,11 @@ Global
{101515E6-74C1-40F9-85C8-871F742A378D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{101515E6-74C1-40F9-85C8-871F742A378D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{101515E6-74C1-40F9-85C8-871F742A378D}.Release|Any CPU.Build.0 = Release|Any CPU
{7F0AE083-9DB8-4BD4-91F7-C199DCC7301D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{728CBE16-1D52-4F84-AF01-7229E6013512}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{728CBE16-1D52-4F84-AF01-7229E6013512}.Debug|Any CPU.Build.0 = Debug|Any CPU
{728CBE16-1D52-4F84-AF01-7229E6013512}.Release|Any CPU.ActiveCfg = Release|Any CPU
{728CBE16-1D52-4F84-AF01-7229E6013512}.Release|Any CPU.Build.0 = Release|Any CPU
{7F0AE083-9DB8-4BD4-91F7-C199DCC7301D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F0AE083-9DB8-4BD4-91F7-C199DCC7301D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F0AE083-9DB8-4BD4-91F7-C199DCC7301D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F0AE083-9DB8-4BD4-91F7-C199DCC7301D}.Release|Any CPU.Build.0 = Release|Any CPU
Expand Down Expand Up @@ -194,7 +206,8 @@ Global
GlobalSection(NestedProjects) = preSolution
{DCECB1F6-D9AA-431F-AE42-25D56B9E7DFC} = {673F23AE-7694-4BB9-ABD4-136D6C13634E}
{2EAFA567-9F68-4C52-9DBC-8F3EC11BB2CE} = {673F23AE-7694-4BB9-ABD4-136D6C13634E}
{4B204EB3-C478-422E-9B6F-62DF3871291A} = {673F23AE-7694-4BB9-ABD4-136D6C13634E}
{3792268A-EF08-4569-8118-991E08FD61C4} = {673F23AE-7694-4BB9-ABD4-136D6C13634E}
{4B204EB3-C478-422E-9B6F-62DF3871291A} = {673F23AE-7694-4BB9-ABD4-136D6C13634E}
{1266E1E6-5CEF-4161-8B45-83282455746E} = {673F23AE-7694-4BB9-ABD4-136D6C13634E}
{2613F146-6C66-4059-9D37-D48BA6B61515} = {673F23AE-7694-4BB9-ABD4-136D6C13634E}
{121FB123-40D9-44D4-9AB7-AD57ED34F466} = {673F23AE-7694-4BB9-ABD4-136D6C13634E}
Expand All @@ -207,7 +220,8 @@ Global
{2478673C-B063-469D-ABD1-0C3E0A25541B} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF}
{E4520FB1-4466-4DCA-AD08-4075102C68D3} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF}
{101515E6-74C1-40F9-85C8-871F742A378D} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF}
{7F0AE083-9DB8-4BD4-91F7-C199DCC7301D} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF}
{728CBE16-1D52-4F84-AF01-7229E6013512} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF}
{7F0AE083-9DB8-4BD4-91F7-C199DCC7301D} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF}
{5DB1F35F-B714-4B62-84BE-16A33084D3E1} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF}
{82A7E7B8-3187-4CAE-845B-0BF43409B38A} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF}
{25DBED78-99F4-433F-BBF5-1B4E9DEAE437} = {7164F1FB-7F24-444A-ACD2-2C329C2B3CCF}
Expand Down
1 change: 1 addition & 0 deletions src/Testcontainers.LocalStack/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
root = true
65 changes: 65 additions & 0 deletions src/Testcontainers.LocalStack/LocalStackBuilder.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
namespace Testcontainers.LocalStack;

/// <inheritdoc cref="ContainerBuilder{TBuilderEntity, TContainerEntity, TConfigurationEntity}" />
[PublicAPI]
public sealed class LocalStackBuilder : ContainerBuilder<LocalStackBuilder, LocalStackContainer, LocalStackConfiguration>
{
public const ushort LocalStackPort = 4566;
public const string LocalStackImage = "localstack/localstack:1.4.0";

/// <summary>
/// Initializes a new instance of the <see cref="LocalStackBuilder" /> class.
/// </summary>
public LocalStackBuilder()
: this(new LocalStackConfiguration())
{
DockerResourceConfiguration = Init().DockerResourceConfiguration;
}

/// <summary>
/// Initializes a new instance of the <see cref="LocalStackBuilder" /> class.
/// </summary>
/// <param name="dockerResourceConfiguration">The Docker resource configuration.</param>
private LocalStackBuilder(LocalStackConfiguration dockerResourceConfiguration)
: base(dockerResourceConfiguration)
{
DockerResourceConfiguration = dockerResourceConfiguration;
}

/// <inheritdoc />
protected override LocalStackConfiguration DockerResourceConfiguration { get; }

/// <inheritdoc />
public override LocalStackContainer Build()
{
Validate();
return new LocalStackContainer(DockerResourceConfiguration, TestcontainersSettings.Logger);
}

/// <inheritdoc />
protected override LocalStackBuilder Init()
{
return base.Init()
.WithImage(LocalStackImage)
.WithPortBinding(LocalStackPort, true)
.WithWaitStrategy(Wait.ForUnixContainer().UntilHttpRequestIsSucceeded(request => request.ForPath("/_localstack/health").ForPort(LocalStackPort)));
HofmeisterAn marked this conversation as resolved.
Show resolved Hide resolved
}

/// <inheritdoc />
protected override LocalStackBuilder Clone(IContainerConfiguration resourceConfiguration)
{
return Merge(DockerResourceConfiguration, new LocalStackConfiguration(resourceConfiguration));
}

/// <inheritdoc />
protected override LocalStackBuilder Clone(IResourceConfiguration<CreateContainerParameters> resourceConfiguration)
{
return Merge(DockerResourceConfiguration, new LocalStackConfiguration(resourceConfiguration));
}

/// <inheritdoc />
protected override LocalStackBuilder Merge(LocalStackConfiguration oldValue, LocalStackConfiguration newValue)
{
return new LocalStackBuilder(new LocalStackConfiguration(oldValue, newValue));
}
}
53 changes: 53 additions & 0 deletions src/Testcontainers.LocalStack/LocalStackConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
namespace Testcontainers.LocalStack;

/// <inheritdoc cref="ContainerConfiguration" />
[PublicAPI]
public sealed class LocalStackConfiguration : ContainerConfiguration
{
/// <summary>
/// Initializes a new instance of the <see cref="LocalStackConfiguration" /> class.
/// </summary>
public LocalStackConfiguration()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="LocalStackConfiguration" /> class.
/// </summary>
/// <param name="resourceConfiguration">The Docker resource configuration.</param>
public LocalStackConfiguration(IResourceConfiguration<CreateContainerParameters> resourceConfiguration)
: base(resourceConfiguration)
{
// Passes the configuration upwards to the base implementations to create an updated immutable copy.
}

/// <summary>
/// Initializes a new instance of the <see cref="LocalStackConfiguration" /> class.
/// </summary>
/// <param name="resourceConfiguration">The Docker resource configuration.</param>
public LocalStackConfiguration(IContainerConfiguration resourceConfiguration)
: base(resourceConfiguration)
{
// Passes the configuration upwards to the base implementations to create an updated immutable copy.
}

/// <summary>
/// Initializes a new instance of the <see cref="LocalStackConfiguration" /> class.
/// </summary>
/// <param name="resourceConfiguration">The Docker resource configuration.</param>
public LocalStackConfiguration(LocalStackConfiguration resourceConfiguration)
: this(new LocalStackConfiguration(), resourceConfiguration)
{
// Passes the configuration upwards to the base implementations to create an updated immutable copy.
}

/// <summary>
/// Initializes a new instance of the <see cref="LocalStackConfiguration" /> class.
/// </summary>
/// <param name="oldValue">The old Docker resource configuration.</param>
/// <param name="newValue">The new Docker resource configuration.</param>
public LocalStackConfiguration(LocalStackConfiguration oldValue, LocalStackConfiguration newValue)
: base(oldValue, newValue)
{
}
}
28 changes: 28 additions & 0 deletions src/Testcontainers.LocalStack/LocalStackContainer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace Testcontainers.LocalStack;

/// <inheritdoc cref="DockerContainer" />
[PublicAPI]
public sealed class LocalStackContainer : DockerContainer
{
private readonly LocalStackConfiguration _configuration;

/// <summary>
/// Initializes a new instance of the <see cref="LocalStackContainer" /> class.
/// </summary>
/// <param name="configuration">The container configuration.</param>
/// <param name="logger">The logger.</param>
public LocalStackContainer(LocalStackConfiguration configuration, ILogger logger)
: base(configuration, logger)
{
_configuration = configuration;
}

/// <summary>
/// Gets the LocalStack endpoint.
/// </summary>
/// <returns>The LocalStack endpoint.</returns>
public string GetEndpoint()
{
return new UriBuilder(Uri.UriSchemeHttp, Hostname, GetMappedPublicPort(LocalStackBuilder.LocalStackPort)).ToString();
}
}
12 changes: 12 additions & 0 deletions src/Testcontainers.LocalStack/Testcontainers.LocalStack.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionDir)src/Testcontainers/Testcontainers.csproj" />
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions src/Testcontainers.LocalStack/Usings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
global using System;
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;
global using Microsoft.Extensions.Logging;
global using System.Threading.Tasks;
1 change: 1 addition & 0 deletions tests/Testcontainers.LocalStack.Tests/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
root = true
132 changes: 132 additions & 0 deletions tests/Testcontainers.LocalStack.Tests/LocalStackContainerTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
namespace Testcontainers.LocalStack;

public sealed class LocalStackContainerTest : IAsyncLifetime
{
private readonly LocalStackContainer _localStackContainer = new LocalStackBuilder().Build();

static LocalStackContainerTest()
{
Environment.SetEnvironmentVariable("AWS_ACCESS_KEY_ID", "AKIAIOSFODNN7EXAMPLE");
Environment.SetEnvironmentVariable("AWS_SECRET_ACCESS_KEY", "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY");
}

public Task InitializeAsync()
{
return _localStackContainer.StartAsync();
}

public Task DisposeAsync()
{
return _localStackContainer.DisposeAsync().AsTask();
}

[Fact]
[Trait(nameof(DockerCli.DockerPlatform), nameof(DockerCli.DockerPlatform.Linux))]
public async Task ListAmazonS3BucketsReturnsHttpStatusCodeOk()
{
// Given
var config = new AmazonS3Config();
config.ServiceURL = _localStackContainer.GetEndpoint();

var client = new AmazonS3Client(config);

// When
var buckets = await client.ListBucketsAsync()
.ConfigureAwait(false);

// Then
Assert.Equal(HttpStatusCode.OK, buckets.HttpStatusCode);
}

[Fact]
[Trait(nameof(DockerCli.DockerPlatform), nameof(DockerCli.DockerPlatform.Linux))]
public async Task CreateDynamoDbTableReturnsCorrectTableDescription()
{
// Given
const string tableName = "TestDynamoDbTable";
var clientConfig = new AmazonDynamoDBConfig();
clientConfig.ServiceURL = this._localStackContainer.GetEndpoint();
clientConfig.UseHttp = true;
using var client = new AmazonDynamoDBClient(clientConfig);

// When
_ = await client.CreateTableAsync(new CreateTableRequest()
{
TableName = tableName,
AttributeDefinitions = new List<AttributeDefinition>()
{
new AttributeDefinition("Id", ScalarAttributeType.S),
new AttributeDefinition("Name", ScalarAttributeType.S),
},
KeySchema = new List<KeySchemaElement>()
{ new KeySchemaElement("Id", KeyType.HASH), new KeySchemaElement("Name", KeyType.RANGE), },
ProvisionedThroughput = new ProvisionedThroughput(1, 1),
TableClass = TableClass.STANDARD,
})
.ConfigureAwait(false);

var tableDescription = await client.DescribeTableAsync(tableName).ConfigureAwait(false);

// Then
Assert.NotNull(tableDescription);
Assert.Equal(HttpStatusCode.OK, tableDescription.HttpStatusCode);
Assert.Equal(tableName, tableDescription.Table.TableName);
Assert.Equal("Id", tableDescription.Table.KeySchema[0].AttributeName);
}

[Fact]
[Trait(nameof(DockerCli.DockerPlatform), nameof(DockerCli.DockerPlatform.Linux))]
public async Task CreateSqsQueueReturnsHttpStatusCodeOk()
{
// Given
string queueName = Guid.NewGuid().ToString("D");
var clientConfig = new AmazonSQSConfig();
clientConfig.ServiceURL = this._localStackContainer.GetEndpoint();
clientConfig.UseHttp = true;
using var client = new AmazonSQSClient(clientConfig);

// When
var response = await client.CreateQueueAsync(new CreateQueueRequest(queueName));

// Then
Assert.Equal(HttpStatusCode.OK, response.HttpStatusCode);
}

[Fact]
[Trait(nameof(DockerCli.DockerPlatform), nameof(DockerCli.DockerPlatform.Linux))]
public async Task CreateLogGroupReturnsHttpStatusCodeOk()
{
// Given
string logGroupName = Guid.NewGuid().ToString("D");
var clientConfig = new AmazonCloudWatchLogsConfig();
clientConfig.ServiceURL = this._localStackContainer.GetEndpoint();
clientConfig.UseHttp = true;
using var client = new AmazonCloudWatchLogsClient(clientConfig);

// When
var response = await client.CreateLogGroupAsync(new CreateLogGroupRequest(logGroupName));

// Then
Assert.Equal(HttpStatusCode.OK, response.HttpStatusCode);
}


[Fact]
[Trait(nameof(DockerCli.DockerPlatform), nameof(DockerCli.DockerPlatform.Linux))]
public async Task CreateSnsTopicReturnsHttpStatusCodeOk()
{
// Given
string topicName = Guid.NewGuid().ToString("D");
var clientConfig = new AmazonSimpleNotificationServiceConfig();
clientConfig.ServiceURL = this._localStackContainer.GetEndpoint();
clientConfig.UseHttp = true;
using var client =
new AmazonSimpleNotificationServiceClient(clientConfig);

// When
var response = await client.CreateTopicAsync(new CreateTopicRequest(topicName));

// Then
Assert.Equal(HttpStatusCode.OK, response.HttpStatusCode);
}
}
Loading