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

(wip) CLI Acceptance tests #61

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

(wip) CLI Acceptance tests #61

wants to merge 27 commits into from

Conversation

ess
Copy link
Contributor

@ess ess commented May 31, 2016

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.

Dennis Walters added 27 commits May 29, 2016 05:03
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant