Skip to content

Commit d9fcd70

Browse files
committed
tests: Add test for cloe-engine --write-output and --output-path
1 parent 4fc65ac commit d9fcd70

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_engine.bats

+10
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ load setup_testname
3838
cloe-engine run test_engine_smoketest.json
3939
}
4040

41+
@test "$(testname 'Expect run success' 'test_engine_smoketest.json' '8e2c5c01-5d7e-45a5-a0fb-d8a338cefcde')" {
42+
# Test cloe-engine --output-path and --write-output flag. (In the test environment, CLOE_WRITE_OUTPUT=0.)
43+
local output_path="$(mktemp -d --suffix=.cloe-test)"
44+
mkdir -p "$output_path"
45+
run cloe-engine run --write-output --output-path="$output_path" test_engine_smoketest.json
46+
test $status -eq 0
47+
test -f "$output_path/result.json"
48+
rm -rf "$output_path"
49+
}
50+
4151
@test "$(testname 'Expect check failure' 'test_engine_bad_logging.json' '107c36fe-7bd9-4559-b5e9-74b72baafd9f')" {
4252
run cloe-engine check test_bad_logging.json
4353
assert_check_failure $status $output

0 commit comments

Comments
 (0)