test: do exact diff of JSON for integration
All checks were successful
continuous-integration/drone/push Build is passing

See coop-cloud/organising#627
This commit is contained in:
decentral1se 2024-07-16 23:19:36 +02:00
parent e42a1bca29
commit d1876e2fae
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410

View File

@ -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"
}