From 68c41e9b66002a68f76d8a96a30c859d3215540f Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 28 Apr 2026 12:53:00 +0200 Subject: [PATCH] [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 --- .../test/acceptance/js/storage/back_fill_file_hash.test.mjs | 4 ++++ .../history-v1/test/acceptance/js/storage/support/cleanup.js | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/services/history-v1/test/acceptance/js/storage/back_fill_file_hash.test.mjs b/services/history-v1/test/acceptance/js/storage/back_fill_file_hash.test.mjs index 9f9168dddb..14a1c811d6 100644 --- a/services/history-v1/test/acceptance/js/storage/back_fill_file_hash.test.mjs +++ b/services/history-v1/test/acceptance/js/storage/back_fill_file_hash.test.mjs @@ -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() diff --git a/services/history-v1/test/acceptance/js/storage/support/cleanup.js b/services/history-v1/test/acceptance/js/storage/support/cleanup.js index f316b1ebad..c8b545cc2f 100644 --- a/services/history-v1/test/acceptance/js/storage/support/cleanup.js +++ b/services/history-v1/test/acceptance/js/storage/support/cleanup.js @@ -20,7 +20,6 @@ const MONGO_COLLECTIONS = [ 'deletedProjects', 'projects', 'projectHistoryBackedUpBlobs', - 'migrations', ] // make sure we don't delete the wrong data by accident