cevoaustralia / aws-google-auth

Provides AWS STS credentials based on Google Apps SAML SSO auth (what a jumble!)
MIT License
537 stars 181 forks source link

prevent usage of keyring in test_process_auth_dont_resolve_alias #88

Closed endorama closed 6 years ago

endorama commented 6 years ago

During testing for #86 there was a failing test (test_process_auth_dont_resolve_alias) only on my local machine.

The test was failing (remotely) because the Google Password: prompt was presented when not expected.

Test were failing only on Travis, and not on my laptop, which was unexpected. Also, test where failing using the origin/master branch ( in my fork ) up to date with upstream/master, which was unexpected because Travis build for upstream master are green. This shown that the problem is not related to the PR #86.

So:

This was happening because that test was writing in the my laptop keyring :sweat: : at first run the pass value was saved in the keyring, making all successive test run failing. The Google Password prompt, which was expected, was not run after the first time, because the value was being retrieved from keyring.

This PR force the config mock keyring to False, in order to never use the keyring: this way the prompt is always present and tests are happy.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.6%) to 48.362% when pulling 9dfe10cbef67b361b52b7abaf1d642c8366622f0 on endorama:fix_test_process_auth_dont_resolve_alias into 53a89b8df254d0eeea9fafee89ca03b7936c0420 on cevoaustralia:master.