Procházet zdrojové kódy

[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
Jakob Ackermann před 3 měsíci
rodič
revize
68c41e9b66

+ 4 - 0
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()

+ 0 - 1
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