Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS: ensure request parameters are sent with generate_credentials #403

Merged
merged 4 commits into from Mar 18, 2019
Merged
Changes from 3 commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -327,6 +327,6 @@ def generate_credentials(self, name, role_arn=None, ttl="3600s", endpoint='creds
)
response = self._adapter.get(
url=api_path,
json=params,
params=params,
)
return response.json()
@@ -254,11 +254,16 @@ def test_read_role(self, label, configure_first=True, raises=None, exception_mes
d1=json.loads(read_role_response['data']['policy']),
d2=self.TEST_POLICY_DOCUMENT,
)
else:
elif 'credential_types' in read_role_response['data']:

This comment has been minimized.

Copy link
@jeffwecan

jeffwecan Mar 15, 2019

Collaborator

I don't have any issue with working around the credential_type / credential_types change in this secrets engine in this manner, but another option would be to go off the Vault version being tested against. E.g.:

key_name = 'credential_types' if vault_version_lt('1.0.0') else 'credential_type'
self.assertEqual(
    first=read_role_response['data'][key_name],
    second=['iam_user'],
)

I like that route because it makes things a bit more explicit. What do you think?

This comment has been minimized.

Copy link
@steved

steved Mar 18, 2019

Author Contributor

Sure! Changed and added a link to the corresponding vault commit.

self.assertEqual(
first=read_role_response['data']['credential_types'],
second=['iam_user'],
)
else:
self.assertEqual(
first=read_role_response['data']['credential_type'],
second='iam_user',
)

@parameterized.expand([
param(
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.