GHA DB tests fail if you modify the migration after creation in the same PR #5690
Labels
automation
related to automated testing/deployment/packaging etc.
bug
something isn't working as intended
tests
related to tests and/or testing infrastructure
I'm submitting a ...
Traffic Control components affected ...
Current behavior:
If a migration is edited in the same PR that creates it, the CI action for the database migrations will report that it is out of order, even when it isn't.
Expected behavior:
The tests should account for the possibility that a migration may be edited before being merged, and test accordingly.
Minimal reproduction of the problem with instructions:
My PR #5678 displays this behavior. This is because - I think - the test script assumes that
git --no-pager log --format=%ct 2021032600000000_dsrs_originals.sql
is going to output one line, the time of creation of the migration. It then adds this to an array, and later compares it against the latest modification time of any migration usinggit log -1 --name-status --format="%ct" . | head -n 1
with!=
. So essentially it's comparingto
Which you can see is lining up with part of the
mtime_array
entry, but will never be exactly equal because the entry has two numbers.The text was updated successfully, but these errors were encountered: