forked from docker-archive/classicswarm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request docker-archive#1995 from allencloud/validate-overc…
…ommitRatio-not-to-be-negative validate swarm.overcommit and add integration test for cluster options
- Loading branch information
Showing
2 changed files
with
24 additions
and
2 deletions.
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 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bats | ||
|
||
load ../helpers | ||
|
||
@test "cluster options" { | ||
# cluster option swarm.overcommit | ||
run swarm manage --cluster-opt swarm.overcommit=-2 nodes://192.168.56.22:4444 | ||
[ "$status" -ne 0 ] | ||
[[ "${output}" == *"swarm.overcommit should be larger than -1, -2.000000 is invalid"* ]] | ||
|
||
# cluster option swarm.createretry | ||
run swarm manage --cluster-opt swarm.createretry=-1 nodes://192.168.56.22:4444 | ||
[ "$status" -ne 0 ] | ||
[[ "${output}" == *"swarm.createretry can not be negative, -1 is invalid"* ]] | ||
} |