From e24859bfe62600469f2f7cef5cde1a89961d4f89 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 7 Aug 2026 17:56:15 -0400 Subject: [PATCH] test: stage the migration marker through the trigger The hand-written marker file was created as root, which the config-migrate-env trigger could not overwrite when it ran under a different user. Draining once up front records the migration through the same code path the assertion exercises. --- tests/unit/config.bats | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/config.bats b/tests/unit/config.bats index 402eb0ca2..708ec0af1 100644 --- a/tests/unit/config.bats +++ b/tests/unit/config.bats @@ -624,9 +624,9 @@ teardown() { } @test "(config) config-migrate-env imports an ENV file written after migration" { - # record the migration as already done, so the ENV file below can only have - # been written by hand rather than by an upgrade - run /bin/bash -c "sudo mkdir -p ${DOKKU_LIB_ROOT}/config/config/$TEST_APP && printf true | sudo tee ${DOKKU_LIB_ROOT}/config/config/$TEST_APP/env-migrated" + # drain once so the migration is on record, which makes the ENV file staged + # below one that could only have been written by hand + run_plugn_trigger config-migrate-env echo "output: $output" echo "status: $status" assert_success