Skip to content

Commit b0c41e0

Browse files
kevbiteCopilot
andauthored
Update tests/CompaniesHouse.IntegrationTests/Keys.cs
Co-authored-by: Copilot <[email protected]>
1 parent 332b7a4 commit b0c41e0

File tree

1 file changed

+12
-1
lines changed
  • tests/CompaniesHouse.IntegrationTests

1 file changed

+12
-1
lines changed

tests/CompaniesHouse.IntegrationTests/Keys.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ namespace CompaniesHouse.IntegrationTests
44
{
55
public static class Keys
66
{
7-
public static string ApiKey { get; } = "QNAJ_N174kLfqk8RAQOL3Nir48KjcZckCvolW1s6";
7+
public static string ApiKey
8+
{
9+
get
10+
{
11+
var key = Environment.GetEnvironmentVariable("COMPANIES_HOUSE_API_KEY");
12+
if (string.IsNullOrEmpty(key))
13+
{
14+
throw new InvalidOperationException("COMPANIES_HOUSE_API_KEY environment variable is not set.");
15+
}
16+
return key;
17+
}
18+
}
819
}
920
}

0 commit comments

Comments
 (0)