-
Notifications
You must be signed in to change notification settings - Fork 22
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
(wip) CLI Acceptance tests #61
Open
ess
wants to merge
27
commits into
master
Choose a base branch
from
acceptance-test-boilerplate
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Will need to talk to Eugene soon to figure out how to properly mock this stuff for acceptance tests, because using the same tricks that were used with the Ronin cuke suite has so far bore no fruit.
Most of the feature files present are empty, but `accounts` and `version` have been fleshed out.
* Switched from optional env/app to required env/app * Wrote the basic cuke for the `status` command Unrelated, found and fixed a typo that I left in the `environment` command.
* The "mock api" cuke support file now turns on mocking globally * The mock api also uses proper method stubbing to ensure that the mocked API that we've set up is used by the CLI commands * Added the cucumber task to the default rake run
So far as I can tell, there's no real reason that we shouldn't be using -a across the board for the "account" option.
The real client, unless told to do otherwise, only returns 20 results when one does `client.some_resource.all`. This uses the `all_pages` helper to retrive absolutely all resources matching the supplied filters.
Since the mock query interface for servers has been updated and fixed, we can do this without loading ALL OF THE SERVERS
When the CLI starts a chef run, it now also specifies the account and environment on which it's performing said run. This helps us with outside testing, and it also provides a better user experience.
* environment name/id is required, so it was converted from an option to an argument * The account short flag is now -a * The custom short flag is now -c * Informative messages are provided for both ambiguous environment matches as well as multiple run type flags used
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This isn't ready for prime time.
The purpose of this PR/branch is to specify the behavior of the CLI application.
As it's more well-suited for such things, Cucumber (and Aruba) is used for this, complete with a separate coverage report.