-
Notifications
You must be signed in to change notification settings - Fork 28
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
Refactor CLI tests #386
Merged
Merged
Refactor CLI tests #386
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
cmd/amp/cli/test_samples/21-all-logs.yml → cmd/amp/cli/test_samples/logs-all.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
all-logs: | ||
logs-all: | ||
cmd: amp logs | ||
args: | ||
options: | ||
|
2 changes: 1 addition & 1 deletion
2
...amp/cli/test_samples/20-metadata-logs.yml → cmd/amp/cli/test_samples/logs-metadata.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
metadata-logs: | ||
logs-metadata: | ||
cmd: amp logs | ||
args: | ||
- | ||
|
2 changes: 1 addition & 1 deletion
2
...amp/cli/test_samples/19-numbered-logs.yml → cmd/amp/cli/test_samples/logs-numbered.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
numbered-logs: | ||
logs-numbered: | ||
cmd: amp logs | ||
args: | ||
- | ||
|
2 changes: 1 addition & 1 deletion
2
cmd/amp/cli/test_samples/18-stack-logs.yml → cmd/amp/cli/test_samples/logs-stack.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
stack-logs: | ||
logs-stack: | ||
cmd: amp logs | ||
args: | ||
- | ||
|
2 changes: 1 addition & 1 deletion
2
...mp/cli/test_samples/01-create-service.yml → cmd/amp/cli/test_samples/service-create.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
create-service: | ||
service-create: | ||
cmd: amp service create | ||
args: | ||
- appcelerator/pinger | ||
|
2 changes: 1 addition & 1 deletion
2
cmd/amp/cli/test_samples/03-curl-service.yml → cmd/amp/cli/test_samples/service-curl.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
curl-service: | ||
service-curl: | ||
cmd: curl | ||
args: | ||
- localhost:90/ping | ||
|
2 changes: 1 addition & 1 deletion
2
cmd/amp/cli/test_samples/02-list-service.yml → cmd/amp/cli/test_samples/service-list.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
list-service: | ||
service-list: | ||
cmd: docker service ls | ||
args: | ||
options: | ||
|
4 changes: 2 additions & 2 deletions
4
...mp/cli/test_samples/04-remove-service.yml → cmd/amp/cli/test_samples/service-remove.yml
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
2 changes: 1 addition & 1 deletion
2
cmd/amp/cli/test_samples/05-create-stack.yml → cmd/amp/cli/test_samples/stack-create.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
create-stack: | ||
stack-create: | ||
cmd: amp stack up | ||
args: | ||
options: | ||
|
2 changes: 1 addition & 1 deletion
2
cmd/amp/cli/test_samples/06-list-stack.yml → cmd/amp/cli/test_samples/stack-list.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
list-stack: | ||
stack-list: | ||
cmd: amp stack ls | ||
args: | ||
options: | ||
|
6 changes: 3 additions & 3 deletions
6
cmd/amp/cli/test_samples/09-remove-stack.yml → cmd/amp/cli/test_samples/stack-remove.yml
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
4 changes: 2 additions & 2 deletions
4
...amp/cli/test_samples/08-restart-stack.yml → cmd/amp/cli/test_samples/stack-restart.yml
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
4 changes: 2 additions & 2 deletions
4
cmd/amp/cli/test_samples/07-stop-stack.yml → cmd/amp/cli/test_samples/stack-stop.yml
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
2 changes: 1 addition & 1 deletion
2
...p/cli/test_samples/14-container-stats.yml → cmd/amp/cli/test_samples/stats-container.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
container-stats: | ||
stats-container: | ||
cmd: amp stats | ||
args: | ||
- | ||
|
2 changes: 1 addition & 1 deletion
2
cmd/amp/cli/test_samples/10-cpu-stats.yml → cmd/amp/cli/test_samples/stats-cpu.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
cpu-stats: | ||
stats-cpu: | ||
cmd: amp stats | ||
args: | ||
- | ||
|
2 changes: 1 addition & 1 deletion
2
cmd/amp/cli/test_samples/12-io-stats.yml → cmd/amp/cli/test_samples/stats-io.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
io-stats: | ||
stats-io: | ||
cmd: amp stats | ||
args: | ||
- | ||
|
2 changes: 1 addition & 1 deletion
2
cmd/amp/cli/test_samples/11-mem-stats.yml → cmd/amp/cli/test_samples/stats-mem.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
mem-stats: | ||
stats-mem: | ||
cmd: amp stats | ||
args: | ||
- | ||
|
2 changes: 1 addition & 1 deletion
2
cmd/amp/cli/test_samples/15-net-stats.yml → cmd/amp/cli/test_samples/stats-net.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
net-stats: | ||
stats-net: | ||
cmd: amp stats | ||
args: | ||
- | ||
|
2 changes: 1 addition & 1 deletion
2
cmd/amp/cli/test_samples/16-node-stats.yml → cmd/amp/cli/test_samples/stats-node.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
node-stats: | ||
stats-node: | ||
cmd: amp stats | ||
args: | ||
- | ||
|
2 changes: 1 addition & 1 deletion
2
...amp/cli/test_samples/17-service-stats.yml → cmd/amp/cli/test_samples/stats-service.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
service-stats: | ||
stats-service: | ||
cmd: amp stats | ||
args: | ||
- | ||
|
2 changes: 1 addition & 1 deletion
2
cmd/amp/cli/test_samples/13-task-stats.yml → cmd/amp/cli/test_samples/stats-task.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
task-stats: | ||
stats-task: | ||
cmd: amp stats | ||
args: | ||
- | ||
|
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.
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.
Originally used a small loop to iterate over the command 10 times. The service create command does not block until the service is built in the swarm.
Tests are currently failing due to this.
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.
Testing a service creation should probably be in a single test spec (not 2 as it is today), and waiting for the service to be up, included in this test spec.