Skip to content

Commit

Permalink
weird
Browse files Browse the repository at this point in the history
  • Loading branch information
David Miller committed Aug 16, 2022
1 parent 5727ccc commit da55941
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/integration/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,16 +359,10 @@ def test_assume_role_with_credential_source(self):
# Setup the config file with the profile we'll be using.
config = (
'[profile assume]\n'
'aws_access_key_id = %s\n'
'aws_secret_access_key = %s\n'
'role_arn = %s\n'
'credential_source = Environment\n'
)
config = config % (
user_creds['AccessKeyId'],
user_creds['SecretAccessKey'],
role['Arn'],
)
config = config % role['Arn']
with open(self.config_file, 'w') as f:
f.write(config)

Expand All @@ -383,4 +377,7 @@ def test_assume_role_with_credential_source(self):
# file and add the expected credentials since we're using the
# environment as our credential source.
os.environ['AWS_CONFIG_FILE'] = self.config_file
os.environ['AWS_SECRET_ACCESS_KEY'] = user_creds['SecretAccessKey']
os.environ['AWS_ACCESS_KEY_ID'] = user_creds['AccessKeyId']

self.assert_s3_read_only_session(Session(profile='assume'))

0 comments on commit da55941

Please sign in to comment.