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.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-08-07 17:56:15 -04:00
1 parent 70dc921967
commit e24859bfe6
1 file changed
+3 -3
+3 -3
View File
@@ -624,9 +624,9 @@ teardown() {
} }
@test "(config) config-migrate-env imports an ENV file written after migration" { @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 # drain once so the migration is on record, which makes the ENV file staged
# been written by hand rather than by an upgrade # below one that could only have been written by hand
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" run_plugn_trigger config-migrate-env
echo "output: $output" echo "output: $output"
echo "status: $status" echo "status: $status"
assert_success assert_success