[history-v1] fix re-running test_acceptance_run (#33183)

* [history-v1] fix re-running test_acceptance_run

Preserve the contents of the migrations collection. Deleting the entries
does not "undo" the migrations. On re-run east would try applying all
migrations and fail as things were already applied.

* [history-v1] remove guard migration before running tests

GitOrigin-RevId: e6eeafd58215e5148dd70c37c7a87d84e0a12bf3
This commit is contained in:
Jakob Ackermann
2026-04-28 12:53:00 +02:00
committed by Copybot
parent f3ec774e6b
commit 68c41e9b66
2 changed files with 4 additions and 1 deletions

View File

@@ -471,6 +471,10 @@ describe('back_fill_file_hash script', function () {
async function prepareEnvironment() {
await cleanup.everything()
// Manually remove the guard that is created after running the binary files migration.
await db
.collection('migrations')
.deleteOne({ name: '20250519101128_binary_files_migration' })
await mockFilestore.start()
await populateMongo()
await populateHistoryV1()

View File

@@ -20,7 +20,6 @@ const MONGO_COLLECTIONS = [
'deletedProjects',
'projects',
'projectHistoryBackedUpBlobs',
'migrations',
]
// make sure we don't delete the wrong data by accident