From 350ee7f6923ab80756b8a878148598de51b5cc3d Mon Sep 17 00:00:00 2001 From: Mono <81423605+monofunc@users.noreply.github.com> Date: Sun, 17 Aug 2025 17:51:53 +0400 Subject: [PATCH] Set AWS Region explicitly --- .../DependencyInjection/RegistrationTests.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/HealthChecks.Publisher.CloudWatch.Tests/DependencyInjection/RegistrationTests.cs b/test/HealthChecks.Publisher.CloudWatch.Tests/DependencyInjection/RegistrationTests.cs index 2b9ef3d75a..7952d43987 100644 --- a/test/HealthChecks.Publisher.CloudWatch.Tests/DependencyInjection/RegistrationTests.cs +++ b/test/HealthChecks.Publisher.CloudWatch.Tests/DependencyInjection/RegistrationTests.cs @@ -8,7 +8,7 @@ public void add_healthcheck_when_properly_configured_with_default_parameter() var services = new ServiceCollection(); services .AddHealthChecks() - .AddCloudWatchPublisher(); + .AddCloudWatchPublisher(options => options.Region = Amazon.RegionEndpoint.USEast1); using var serviceProvider = services.BuildServiceProvider(); var publisher = serviceProvider.GetService(); @@ -22,7 +22,11 @@ public void add_healthcheck_when_properly_configured_with_custom_service_check_n var services = new ServiceCollection(); services .AddHealthChecks() - .AddCloudWatchPublisher(options => options.ServiceCheckName = "serviceCheckName"); + .AddCloudWatchPublisher(options => + { + options.ServiceCheckName = "serviceCheckName"; + options.Region = Amazon.RegionEndpoint.USEast1; + }); using var serviceProvider = services.BuildServiceProvider(); var publisher = serviceProvider.GetService();