Fix AWS credentials test failure when env vars set (#2062)

This commit is contained in:
Zachary Wasserman 2016-05-02 19:17:09 -07:00 committed by Teddy Reed
parent 9c541ee1ce
commit 4bb95a3a29

View File

@ -35,6 +35,10 @@ TEST_F(AwsUtilTests, test_get_credentials) {
std::string profile_path = kTestDataPath + "/aws/credentials";
setenv(kAwsProfileFileEnvVar, profile_path.c_str(), true);
// Clear any values for the other AWS env vars
unsetenv(kAwsAccessKeyEnvVar);
unsetenv(kAwsSecretKeyEnvVar);
OsqueryAWSCredentialsProviderChain provider;
Aws::Auth::AWSCredentials credentials("", "");