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

Need support for AWS tests #52

Open
tyler-ball opened this issue Jul 1, 2015 · 2 comments
Open

Need support for AWS tests #52

tyler-ball opened this issue Jul 1, 2015 · 2 comments
Labels
Aspect: RSpec Triage: Needs Information Indicates an issue needs more information in order to work on it. Type: Enhancement Adds new functionality.

Comments

@tyler-ball
Copy link
Contributor

The expect_recipe matcher currently converges the recipe. The matchers inside the AWS integration tests run converge themselves. We need to expose a new matcher that basically calls expect( recipe {...}) without converging the recipe.

The be_idempotent matcher should check to see if the recipe that just ran had any failures. If it did, we shouldn't try to run it again - this will just cause the recipe to fail again and in the AWS case it will spin up more AWS resource. Inside be_idempotent it looks like we can check chef_run#converge_failed?

Finally, when running the AWS tests (even without expect_recipe) something is trying to converge a failing recipe an additional time. Adding a breakpoint here and you can see it getting called twice (if the recipe being converged raises an exception). A fix might be as simple as checking converge_failed? and not re-converge, but I would like to understand why the converge is being called a second time on a failure. Is it called a second time on success? Is it called a second time if using expect_recipe instead of expect(recipe {?

\cc @jkeiser @metadave

@randomcamel
Copy link
Contributor

Having be_idempotent run the code instead of expect is super goofy, for the record.

@jkeiser
Copy link
Contributor

jkeiser commented Jul 11, 2015

That's actually how matchers for blocks work. The matcher is responsible for running it.

@thommay thommay added this to the Accepted Minor milestone Dec 7, 2016
@tas50 tas50 added Triage: Needs Information Indicates an issue needs more information in order to work on it. and removed Status: Pending Contributor Response labels Dec 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aspect: RSpec Triage: Needs Information Indicates an issue needs more information in order to work on it. Type: Enhancement Adds new functionality.
Projects
None yet
Development

No branches or pull requests

5 participants