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 #294 from tmenjo/test-fix-set-throttle
tests: Add a functional test 107 for "dog node recovery set-throttle"
- Loading branch information
Showing
3 changed files
with
97 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
# Test dog node recovery set-throttle | ||
|
||
. ./common | ||
|
||
function oneTimeSetUp { | ||
_start_sheep 0 | ||
_wait_for_sheep 1 | ||
_cluster_format -c 1 | ||
} | ||
|
||
function setUp { | ||
dog node recovery set-throttle -- 0 0 | ||
} | ||
|
||
function testSetThrottleSuccess { | ||
setUp | ||
dog node recovery set-throttle -- "$@" | ||
[ $? -eq 0 ] || exit 1 | ||
dog node recovery get-throttle | ||
} | ||
|
||
function testSetThrottleFailure { | ||
setUp | ||
! dog node recovery set-throttle -- "$@" | ||
[ $? -eq 0 ] || exit 1 | ||
dog node recovery get-throttle | ||
} | ||
|
||
oneTimeSetUp | ||
|
||
testSetThrottleFailure 0 1 | ||
testSetThrottleFailure 0 -1 | ||
testSetThrottleFailure 0 -2 | ||
|
||
testSetThrottleFailure 1 0 | ||
testSetThrottleFailure 1 -1 | ||
testSetThrottleFailure 1 -2 | ||
|
||
testSetThrottleFailure -1 0 | ||
testSetThrottleFailure -1 1 | ||
testSetThrottleFailure -1 -1 | ||
testSetThrottleFailure -1 -2 | ||
|
||
testSetThrottleFailure -2 0 | ||
testSetThrottleFailure -2 1 | ||
testSetThrottleFailure -2 -1 | ||
testSetThrottleFailure -2 -2 | ||
|
||
testSetThrottleFailure 4294967295 9223372036854775808 | ||
testSetThrottleFailure 4294967296 9223372036854775807 | ||
testSetThrottleFailure 4294967296 9223372036854775808 | ||
|
||
testSetThrottleSuccess 0 0 | ||
testSetThrottleSuccess 1 1 | ||
testSetThrottleSuccess 4294967295 9223372036854775807 |
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,39 @@ | ||
QA output created by 107 | ||
using backend plain store | ||
Invalid interval max (0), interval (1) | ||
max (0), interval (0) | ||
Invalid interval (-1) | ||
max (0), interval (0) | ||
Invalid interval (-2) | ||
max (0), interval (0) | ||
Invalid interval max (1), interval (0) | ||
max (0), interval (0) | ||
Invalid interval (-1) | ||
max (0), interval (0) | ||
Invalid interval (-2) | ||
max (0), interval (0) | ||
Invalid max (-1) | ||
max (0), interval (0) | ||
Invalid max (-1) | ||
max (0), interval (0) | ||
Invalid max (-1) | ||
max (0), interval (0) | ||
Invalid max (-1) | ||
max (0), interval (0) | ||
Invalid max (-2) | ||
max (0), interval (0) | ||
Invalid max (-2) | ||
max (0), interval (0) | ||
Invalid max (-2) | ||
max (0), interval (0) | ||
Invalid max (-2) | ||
max (0), interval (0) | ||
Invalid interval (9223372036854775808) | ||
max (0), interval (0) | ||
Invalid max (4294967296) | ||
max (0), interval (0) | ||
Invalid max (4294967296) | ||
max (0), interval (0) | ||
max (0), interval (0) | ||
max (1), interval (1) | ||
max (4294967295), interval (9223372036854775807) |
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 |
---|---|---|
|
@@ -114,3 +114,4 @@ | |
104 auto quick store vdi | ||
105 auto quick vdi | ||
106 auto quick vdi | ||
107 auto quick dog |