test: do exact diff of JSON for integration
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
See coop-cloud/organising#627
This commit is contained in:
parent
e42a1bca29
commit
d1876e2fae
@ -61,12 +61,10 @@ teardown(){
|
||||
}
|
||||
|
||||
@test "machine readable output" {
|
||||
run "$ABRA" server ls --machine
|
||||
output=$("$ABRA" server ls --machine)
|
||||
|
||||
run diff \
|
||||
<(jq -S "." <(echo "$output")) \
|
||||
<(jq -S "." <(echo '[{"host":"local","name":"default"}]'))
|
||||
assert_success
|
||||
|
||||
expectedOutput='[{"name":"'
|
||||
expectedOutput+="$TEST_SERVER"
|
||||
expectedOutput+='"'
|
||||
|
||||
assert_output --partial "$expectedOutput"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user