test decision list -m (#1365)
This commit is contained in:
parent
e4cc5fc997
commit
9a6a254a90
|
@ -32,6 +32,11 @@ teardown() {
|
|||
assert_output --partial "| 'githubciXXXXXXXXXXXXXXXXXXXXXXXX' |"
|
||||
refute_output --partial "| githubciXXXXXXXXXXXXXXXXXXXXXXXX |"
|
||||
|
||||
run -0 cscli alerts list -m
|
||||
assert_output --partial 'MACHINE'
|
||||
assert_output --partial "| 'githubciXXXXXXXXXXXXXXXXXXXXXXXX' |"
|
||||
assert_output --partial "| githubciXXXXXXXXXXXXXXXXXXXXXXXX |"
|
||||
|
||||
run -0 cscli alerts list --machine
|
||||
assert_output --partial 'MACHINE'
|
||||
assert_output --partial "| 'githubciXXXXXXXXXXXXXXXXXXXXXXXX' |"
|
||||
|
|
|
@ -37,3 +37,23 @@ declare stderr
|
|||
assert_output '["fatal","Missing arguments, a value is required (--ip, --range or --scope and --value)"]'
|
||||
}
|
||||
|
||||
@test "$FILE cscli decisions list, with and without --machine" {
|
||||
run -0 cscli decisions add -i 10.20.30.40 -t ban
|
||||
|
||||
run -0 cscli decisions list
|
||||
refute_output --partial 'MACHINE'
|
||||
# machine name appears quoted in the "REASON" column
|
||||
assert_output --partial "| 'githubciXXXXXXXXXXXXXXXXXXXXXXXX' |"
|
||||
refute_output --partial "| githubciXXXXXXXXXXXXXXXXXXXXXXXX |"
|
||||
|
||||
run -0 cscli decisions list -m
|
||||
assert_output --partial 'MACHINE'
|
||||
assert_output --partial "| 'githubciXXXXXXXXXXXXXXXXXXXXXXXX' |"
|
||||
assert_output --partial "| githubciXXXXXXXXXXXXXXXXXXXXXXXX |"
|
||||
|
||||
run -0 cscli decisions list --machine
|
||||
assert_output --partial 'MACHINE'
|
||||
assert_output --partial "| 'githubciXXXXXXXXXXXXXXXXXXXXXXXX' |"
|
||||
assert_output --partial "| githubciXXXXXXXXXXXXXXXXXXXXXXXX |"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue