From fbb6ece5863fcb51b295f71df14e408b419222e6 Mon Sep 17 00:00:00 2001 From: Bryan Moffatt Date: Sat, 20 Aug 2022 23:24:56 -0700 Subject: [PATCH] throw if AWS_REGION environment variable is missing --- tests/runtime_tests.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/runtime_tests.cpp b/tests/runtime_tests.cpp index 64ad79f..9d0ee72 100644 --- a/tests/runtime_tests.cpp +++ b/tests/runtime_tests.cpp @@ -44,6 +44,9 @@ struct LambdaRuntimeTest : public ::testing::Test { Aws::Client::ClientConfiguration config; config.requestTimeoutMs = REQUEST_TIMEOUT; config.region = Aws::Environment::GetEnv("AWS_REGION"); + if (config.region.empty()) { + throw std::invalid_argument("environment variable AWS_REGION not set"); + } return config; }