From 75503c5396e9a205cf2c8d8f06c2aa5d84865dd7 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 23 Aug 2024 16:19:22 +0200 Subject: [PATCH] actions: feature: compression: do not hardcode the log path The log path depends on the previous actions run and may not always be 01/1.log.zst. Assuming it is makes this test fragile as it is influenced by which previous tests are run and what they do. --- actions/feature-logs-compression/run.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/actions/feature-logs-compression/run.sh b/actions/feature-logs-compression/run.sh index c1cd259..174a24d 100755 --- a/actions/feature-logs-compression/run.sh +++ b/actions/feature-logs-compression/run.sh @@ -5,4 +5,11 @@ set -e source $FEATURE_DIR/../../lib/lib.sh source $FEATURE_DIR/../../forgejo/fixtures.sh -fixture_get_one_path local data/actions_log/root/example-echo/01/1.log.zst +if ! fixture_get_one_path local data/actions_log/root/example-echo | grep --quiet log.zst; then + ( + cd $DIR/forgejo-work-path + find data + ) + echo expected a single log.zst file in data/actions_log/root/example-echo + exit 1 +fi