Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3
fix: keep --json output parseable on stdout#286
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| Feature: CLI JSON Output | ||
| As a developer scripting against the Tower CLI | ||
| I want --json output to be valid JSON on stdout | ||
| So that I can pipe it into jq or parse it programmatically | ||
| Scenario: Detached run with JSON mode emits parseable output with the run link | ||
| Given I have a valid Towerfile in the current directory | ||
| When I run "tower deploy --create" via CLI | ||
| And I run "tower run --detached --json" via CLI | ||
| Then the output should be valid JSON | ||
| And the output should show "See more" | ||
| Scenario: Run of an unknown app with JSON mode emits a parseable error | ||
| Given I have a simple hello world application | ||
| When I run "tower run --json" via CLI | ||
| Then the output should be valid JSON | ||
| And the output should show "tower deploy" | ||
| Scenario: Empty schedules list with JSON mode emits an empty JSON array | ||
| When I run "tower schedules list --json" via CLI | ||
| Then the output should be valid JSON | ||
| And the JSON should be an empty array | ||
| Scenario: Teams list with JSON mode emits parseable output | ||
| When I run "tower teams list --json" via CLI with a temporary session | ||
| Then the output should be valid JSON | ||
| Scenario: Version with JSON mode emits parseable output | ||
| When I run "tower version --json" via CLI | ||
| Then the output should be valid JSON | ||
| And the output should show "version" |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok I made something similar in my PR and after this I can probably remove it