diff --git a/tests/ClientSideMonitoring/ConfigurationProviderTest.php b/tests/ClientSideMonitoring/ConfigurationProviderTest.php index 73f37683bb..04b6a1a2a7 100644 --- a/tests/ClientSideMonitoring/ConfigurationProviderTest.php +++ b/tests/ClientSideMonitoring/ConfigurationProviderTest.php @@ -57,6 +57,7 @@ public static function _setUpBeforeClass() 'port' => getenv(ConfigurationProvider::ENV_PORT) ?: '', 'client_id' => getenv(ConfigurationProvider::ENV_CLIENT_ID) ?: '', 'profile' => getenv(ConfigurationProvider::ENV_PROFILE) ?: '', + 'config_file' => getenv(ConfigurationProvider::ENV_CONFIG_FILE) ?: '', ]; } @@ -90,6 +91,8 @@ public static function _tearDownAfterClass() self::$originalEnv['client_id']); putenv(ConfigurationProvider::ENV_PROFILE . '=' . self::$originalEnv['profile']); + putenv(ConfigurationProvider::ENV_CONFIG_FILE . '=' . + self::$originalEnv['config_file']); } public function testCreatesFromEnvironmentVariables() diff --git a/tests/DefaultsMode/ConfigurationProviderTest.php b/tests/DefaultsMode/ConfigurationProviderTest.php index eca5da78d4..e49c557e71 100644 --- a/tests/DefaultsMode/ConfigurationProviderTest.php +++ b/tests/DefaultsMode/ConfigurationProviderTest.php @@ -39,6 +39,7 @@ public static function _setUpBeforeClass() 'mode' => getenv(ConfigurationProvider::ENV_MODE) ?: '', 'home' => getenv('HOME') ?: '', 'profile' => getenv(ConfigurationProvider::ENV_PROFILE) ?: '', + 'config_file' => getenv(ConfigurationProvider::ENV_CONFIG_FILE) ?: '', ]; } @@ -46,6 +47,7 @@ private function clearEnv() { putenv(ConfigurationProvider::ENV_MODE . '='); putenv(ConfigurationProvider::ENV_CONFIG_FILE . '='); + putenv(ConfigurationProvider::ENV_PROFILE . '='); $dir = sys_get_temp_dir() . '/.aws'; @@ -62,6 +64,8 @@ public static function _tearDownAfterClass() self::$originalEnv['mode']); putenv(ConfigurationProvider::ENV_PROFILE . '=' . self::$originalEnv['profile']); + putenv(ConfigurationProvider::ENV_CONFIG_FILE . '=' . + self::$originalEnv['config_file']); putenv('HOME=' . self::$originalEnv['home']); } diff --git a/tests/Endpoint/UseDualstackEndpoint/ConfigurationProviderTest.php b/tests/Endpoint/UseDualstackEndpoint/ConfigurationProviderTest.php index 16de56b55e..c94f206d06 100644 --- a/tests/Endpoint/UseDualstackEndpoint/ConfigurationProviderTest.php +++ b/tests/Endpoint/UseDualstackEndpoint/ConfigurationProviderTest.php @@ -1,5 +1,5 @@ getenv(ConfigurationProvider::ENV_USE_DUAL_STACK_ENDPOINT) ?: '', 'home' => getenv('HOME') ?: '', 'profile' => getenv(ConfigurationProvider::ENV_PROFILE) ?: '', + 'config_file' => getenv(ConfigurationProvider::ENV_CONFIG_FILE) ?: '', ]; } @@ -47,6 +48,7 @@ private function clearEnv() { putenv(ConfigurationProvider::ENV_USE_DUAL_STACK_ENDPOINT . '='); putenv(ConfigurationProvider::ENV_CONFIG_FILE . '='); + putenv(ConfigurationProvider::ENV_PROFILE . '='); $dir = sys_get_temp_dir() . '/.aws'; @@ -63,6 +65,8 @@ public static function _tearDownAfterClass() self::$originalEnv['use_dualstack_endpoint']); putenv(ConfigurationProvider::ENV_PROFILE . '=' . self::$originalEnv['profile']); + putenv(ConfigurationProvider::ENV_CONFIG_FILE . '=' . + self::$originalEnv['config_file']); putenv('HOME=' . self::$originalEnv['home']); } diff --git a/tests/Endpoint/UseFipsEndpoint/ConfigurationProviderTest.php b/tests/Endpoint/UseFipsEndpoint/ConfigurationProviderTest.php index 7ea27d0d18..d290fc8f69 100644 --- a/tests/Endpoint/UseFipsEndpoint/ConfigurationProviderTest.php +++ b/tests/Endpoint/UseFipsEndpoint/ConfigurationProviderTest.php @@ -1,5 +1,5 @@ getenv(ConfigurationProvider::ENV_USE_FIPS_ENDPOINT) ?: '', 'home' => getenv('HOME') ?: '', 'profile' => getenv(ConfigurationProvider::ENV_PROFILE) ?: '', + 'config_file' => getenv(ConfigurationProvider::ENV_CONFIG_FILE) ?: '', ]; } private function clearEnv() { putenv(ConfigurationProvider::ENV_USE_FIPS_ENDPOINT . '='); + putenv(ConfigurationProvider::ENV_PROFILE . '='); putenv(ConfigurationProvider::ENV_CONFIG_FILE . '='); $dir = sys_get_temp_dir() . '/.aws'; @@ -60,9 +62,11 @@ public static function _tearDownAfterClass() { putenv(ConfigurationProvider::ENV_USE_FIPS_ENDPOINT . '=' . self::$originalEnv['use_fips_endpoint']); + putenv('HOME=' . self::$originalEnv['home']); putenv(ConfigurationProvider::ENV_PROFILE . '=' . self::$originalEnv['profile']); - putenv('HOME=' . self::$originalEnv['home']); + putenv(ConfigurationProvider::ENV_CONFIG_FILE . '=' . + self::$originalEnv['config_file']); } public function testCreatesFromEnvironmentVariables() diff --git a/tests/EndpointDiscovery/ConfigurationProviderTest.php b/tests/EndpointDiscovery/ConfigurationProviderTest.php index ef98cdbc45..f63d7d07da 100644 --- a/tests/EndpointDiscovery/ConfigurationProviderTest.php +++ b/tests/EndpointDiscovery/ConfigurationProviderTest.php @@ -44,6 +44,7 @@ public static function _setUpBeforeClass() 'enabled_alt' => getenv(ConfigurationProvider::ENV_ENABLED_ALT) ?: '', 'home' => getenv('HOME') ?: '', 'profile' => getenv(ConfigurationProvider::ENV_PROFILE) ?: '', + 'config_file' => getenv(ConfigurationProvider::ENV_CONFIG_FILE) ?: '', ]; } @@ -52,6 +53,7 @@ private function clearEnv() putenv(ConfigurationProvider::ENV_ENABLED . '='); putenv(ConfigurationProvider::ENV_ENABLED_ALT . '='); putenv(ConfigurationProvider::ENV_CONFIG_FILE . '='); + putenv(ConfigurationProvider::ENV_PROFILE . '='); $dir = sys_get_temp_dir() . '/.aws'; @@ -70,6 +72,8 @@ public static function _tearDownAfterClass() self::$originalEnv['enabled_alt']); putenv(ConfigurationProvider::ENV_PROFILE . '=' . self::$originalEnv['profile']); + putenv(ConfigurationProvider::ENV_CONFIG_FILE . '=' . + self::$originalEnv['config_file']); putenv('HOME=' . self::$originalEnv['home']); } diff --git a/tests/Retry/ConfigurationProviderTest.php b/tests/Retry/ConfigurationProviderTest.php index 5e4a134b30..f9e9e531f1 100644 --- a/tests/Retry/ConfigurationProviderTest.php +++ b/tests/Retry/ConfigurationProviderTest.php @@ -44,6 +44,7 @@ public static function _setUpBeforeClass() 'mode' => getenv(ConfigurationProvider::ENV_MODE) ?: '', 'home' => getenv('HOME') ?: '', 'profile' => getenv(ConfigurationProvider::ENV_PROFILE) ?: '', + 'config_file' => getenv(ConfigurationProvider::ENV_CONFIG_FILE) ?: '', ]; } @@ -52,6 +53,7 @@ private function clearEnv() putenv(ConfigurationProvider::ENV_MODE . '='); putenv(ConfigurationProvider::ENV_MAX_ATTEMPTS . '='); putenv(ConfigurationProvider::ENV_CONFIG_FILE . '='); + putenv(ConfigurationProvider::ENV_PROFILE . '='); $dir = sys_get_temp_dir() . '/.aws'; @@ -70,6 +72,8 @@ public static function _tearDownAfterClass() self::$originalEnv['mode']); putenv(ConfigurationProvider::ENV_PROFILE . '=' . self::$originalEnv['profile']); + putenv(ConfigurationProvider::ENV_CONFIG_FILE . '=' . + self::$originalEnv['config_file']); putenv('HOME=' . self::$originalEnv['home']); } diff --git a/tests/S3/RegionalEndpoint/ConfigurationProviderTest.php b/tests/S3/RegionalEndpoint/ConfigurationProviderTest.php index f6d6845496..d04396a643 100644 --- a/tests/S3/RegionalEndpoint/ConfigurationProviderTest.php +++ b/tests/S3/RegionalEndpoint/ConfigurationProviderTest.php @@ -42,6 +42,7 @@ public static function _setUpBeforeClass() 'endpoints_type' => getenv(ConfigurationProvider::ENV_ENDPOINTS_TYPE) ?: '', 'home' => getenv('HOME') ?: '', 'profile' => getenv(ConfigurationProvider::ENV_PROFILE) ?: '', + 'config_file' => getenv(ConfigurationProvider::ENV_CONFIG_FILE) ?: '', ]; } @@ -49,6 +50,7 @@ private function clearEnv() { putenv(ConfigurationProvider::ENV_ENDPOINTS_TYPE . '='); putenv(ConfigurationProvider::ENV_CONFIG_FILE . '='); + putenv(ConfigurationProvider::ENV_PROFILE . '='); $dir = sys_get_temp_dir() . '/.aws'; @@ -65,6 +67,8 @@ public static function _tearDownAfterClass() self::$originalEnv['endpoints_type']); putenv(ConfigurationProvider::ENV_PROFILE . '=' . self::$originalEnv['profile']); + putenv(ConfigurationProvider::ENV_CONFIG_FILE . '=' . + self::$originalEnv['config_file']); putenv('HOME=' . self::$originalEnv['home']); } diff --git a/tests/S3/UseArnRegion/ConfigurationProviderTest.php b/tests/S3/UseArnRegion/ConfigurationProviderTest.php index b61a9c27d1..6f1b378426 100644 --- a/tests/S3/UseArnRegion/ConfigurationProviderTest.php +++ b/tests/S3/UseArnRegion/ConfigurationProviderTest.php @@ -39,6 +39,7 @@ public static function _setUpBeforeClass() 'use_arn_region' => getenv(ConfigurationProvider::ENV_USE_ARN_REGION) ?: '', 'home' => getenv('HOME') ?: '', 'profile' => getenv(ConfigurationProvider::ENV_PROFILE) ?: '', + 'config_file' => getenv(ConfigurationProvider::ENV_CONFIG_FILE) ?: '', ]; } @@ -46,6 +47,7 @@ private function clearEnv() { putenv(ConfigurationProvider::ENV_USE_ARN_REGION . '='); putenv(ConfigurationProvider::ENV_CONFIG_FILE . '='); + putenv(ConfigurationProvider::ENV_PROFILE . '='); $dir = sys_get_temp_dir() . '/.aws'; @@ -62,6 +64,8 @@ public static function _tearDownAfterClass() self::$originalEnv['use_arn_region']); putenv(ConfigurationProvider::ENV_PROFILE . '=' . self::$originalEnv['profile']); + putenv(ConfigurationProvider::ENV_CONFIG_FILE . '=' . + self::$originalEnv['config_file']); putenv('HOME=' . self::$originalEnv['home']); } diff --git a/tests/Sts/RegionalEndpoints/ConfigurationProviderTest.php b/tests/Sts/RegionalEndpoints/ConfigurationProviderTest.php index ae60071270..2b720b1582 100644 --- a/tests/Sts/RegionalEndpoints/ConfigurationProviderTest.php +++ b/tests/Sts/RegionalEndpoints/ConfigurationProviderTest.php @@ -40,6 +40,7 @@ public static function _setUpBeforeClass() 'endpoints_type' => getenv(ConfigurationProvider::ENV_ENDPOINTS_TYPE) ?: '', 'home' => getenv('HOME') ?: '', 'profile' => getenv(ConfigurationProvider::ENV_PROFILE) ?: '', + 'config_file' => getenv(ConfigurationProvider::ENV_CONFIG_FILE) ?: '', ]; } @@ -47,6 +48,7 @@ private function clearEnv() { putenv(ConfigurationProvider::ENV_ENDPOINTS_TYPE . '='); putenv(ConfigurationProvider::ENV_CONFIG_FILE . '='); + putenv(ConfigurationProvider::ENV_PROFILE . '='); $dir = sys_get_temp_dir() . '/.aws'; @@ -63,6 +65,8 @@ public static function _tearDownAfterClass() self::$originalEnv['endpoints_type']); putenv(ConfigurationProvider::ENV_PROFILE . '=' . self::$originalEnv['profile']); + putenv(ConfigurationProvider::ENV_CONFIG_FILE . '=' . + self::$originalEnv['config_file']); putenv('HOME=' . self::$originalEnv['home']); }