From edc94140ce97b60eab82286150f3f97463e633cb Mon Sep 17 00:00:00 2001 From: Konstantin S Date: Fri, 22 Nov 2024 14:01:50 +0400 Subject: [PATCH] test: Try to fix PR tests. --- src/tests/Anthropic.IntegrationTests/Tests.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tests/Anthropic.IntegrationTests/Tests.cs b/src/tests/Anthropic.IntegrationTests/Tests.cs index 0537942..3b5abb1 100755 --- a/src/tests/Anthropic.IntegrationTests/Tests.cs +++ b/src/tests/Anthropic.IntegrationTests/Tests.cs @@ -9,6 +9,10 @@ private static AnthropicClient GetAuthenticatedClient() Environment.GetEnvironmentVariable("API_KEY") ?? Environment.GetEnvironmentVariable("ANTHROPIC_API_KEY") ?? throw new AssertInconclusiveException("ANTHROPIC_API_KEY environment variable is not found."); + if (string.IsNullOrWhiteSpace(apiKey)) + { + throw new AssertInconclusiveException("ANTHROPIC_API_KEY environment variable is empty."); + } return new AnthropicClient(apiKey); }