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

Add Keypair Unit Test #700

Merged
merged 1 commit into from
Feb 19, 2019

Conversation

alecrajeev
Copy link
Contributor

Uses moto to mock creating and describing the keypair API for unit testing. This increases coverage for hooks/keypair

Copy link
Member

@phobologic phobologic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks!

@danielkza
Copy link
Contributor

This test has hardcoded paths to CircleCI that break running the tests locally: #709

Having written the hook and now looking at this, I strongly recommend to:

a) Not test the logging messages. That makes the test very fragile and adds little value against regressions.
b) Create a temporary directory and use it as the "home base" for any test that requires simulating/inspect file manipulation. It's the most comprehensive way to observe behavior close to reality, and does not break in different environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants