Skip to content

Commit

Permalink
tests: Add test for cloe-engine --write-output and --output-path
Browse files Browse the repository at this point in the history
  • Loading branch information
cassava committed Apr 30, 2024
1 parent e7d307c commit 76abda9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_engine.bats
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ load setup_testname
cloe-engine run test_engine_smoketest.json
}

@test "$(testname 'Expect run success' 'test_engine_smoketest.json' '8e2c5c01-5d7e-45a5-a0fb-d8a338cefcde')" {
# Test cloe-engine --output-path and --write-output flag. (In the test environment, CLOE_WRITE_OUTPUT=0.)
local output_path="$(mktemp -d --suffix=.cloe-test)"
mkdir -p "$output_path"
run cloe-engine run --write-output --output-path="$output_path" test_engine_smoketest.json
test $status -eq 0
test -f "$output_path/result.json"
rm -rf "$output_path"
}

@test "$(testname 'Expect check failure' 'test_engine_bad_logging.json' '107c36fe-7bd9-4559-b5e9-74b72baafd9f')" {
run cloe-engine check test_bad_logging.json
assert_check_failure $status $output
Expand Down

0 comments on commit 76abda9

Please sign in to comment.