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

Minitest picks up tests in provider modules #2755

Merged
merged 2 commits into from Mar 13, 2014
Merged

Conversation

tokengeek
Copy link
Member

This expands the pattern we match tests to run under minitest.

This will run anything under test or providers/*/test so includes tests written by providers.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling a3f63d6 on test_providers into 736e14c on master.

@tokengeek
Copy link
Member Author

Awesome! - This is what CI is useful for.

So the failure is because fog does magic in the background and loads my system ~/fog file into the credentials. Obviously if you do not have the required values, it errors also obviously I missed this problem because I have the credentials.

Underlying issue (#1390) is that Fog.credentials is a global that loads itself based on the environment, so my dev seup or the Travis CI box which is brittle for unit tests.

So the problem is actually in my new provider test which this exposes.

This isolates the tests from the values in `Fog.credentials` which is
based on the contents of `~/.fog`

Underlying problem is that the code (and many others) rely on the Fog
global making it too tightly coupled to the environment hence having to
stub.

Full issue: #1390

This will probably be a repeating pattern we need to work on to DRY up
so every test from every provider doesn't include this setup workaround.
tokengeek added a commit that referenced this pull request Mar 13, 2014
Minitest picks up tests in provider modules
@tokengeek tokengeek merged commit 68f56ce into master Mar 13, 2014
@tokengeek tokengeek deleted the test_providers branch March 13, 2014 11:14
@geemus
Copy link
Member

geemus commented Mar 13, 2014

Thanks!

On Thu, Mar 13, 2014 at 6:14 AM, Paul Thornthwaite <notifications@github.com

wrote:

Merged #2755 #2755.

Reply to this email directly or view it on GitHubhttps://github.com//pull/2755
.

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.

None yet

3 participants