From 76abda918f4d20f485ad0518ea5b516d3ca935de Mon Sep 17 00:00:00 2001 From: Benjamin Morgan Date: Tue, 30 Apr 2024 09:25:24 +0200 Subject: [PATCH] tests: Add test for cloe-engine --write-output and --output-path --- tests/test_engine.bats | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_engine.bats b/tests/test_engine.bats index e85061d02..4466904f5 100755 --- a/tests/test_engine.bats +++ b/tests/test_engine.bats @@ -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