From 1ee44d1141c47741cd46b98d501c87955bd0becd Mon Sep 17 00:00:00 2001 From: Blind-Striker Date: Fri, 22 Sep 2023 10:40:05 +0300 Subject: [PATCH] add env variables to test --- .../AwsClientFactoryWrapperTests.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/LocalStack.Client.Extensions.Tests/AwsClientFactoryWrapperTests.cs b/tests/LocalStack.Client.Extensions.Tests/AwsClientFactoryWrapperTests.cs index f090a48..3c13910 100644 --- a/tests/LocalStack.Client.Extensions.Tests/AwsClientFactoryWrapperTests.cs +++ b/tests/LocalStack.Client.Extensions.Tests/AwsClientFactoryWrapperTests.cs @@ -39,6 +39,10 @@ public void CreateServiceClient_Should_Create_Client_When_UseLocalStack_False() configurationBuilder.AddInMemoryCollection(new KeyValuePair[] { new("LocalStack:UseLocalStack", "false") }); IConfigurationRoot configurationRoot = configurationBuilder.Build(); + Environment.SetEnvironmentVariable("AWS_ACCESS_KEY_ID", "AKIAIOSFODNN7EXAMPLE"); + Environment.SetEnvironmentVariable("AWS_SECRET_ACCESS_KEY", "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"); + Environment.SetEnvironmentVariable("AWS_DEFAULT_REGION", "us-west-2"); + ServiceCollection serviceCollection = new(); serviceCollection.AddLocalStack(configurationRoot); serviceCollection.AddAWSServiceLocalStack();