mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
fix(data): harden migration cleanup flow
Show the pending cleanup notice in CLI Web after initialization while excluding the browser-only runtime.\n\nStub config persistence in the cleanup test so it cannot overwrite the user's real data directory settings.
This commit is contained in:
1 parent
355d6cfd4d
commit
1f3069f359
2 files changed
+12
-7
No files matched your search
@@ -274,7 +274,14 @@ test('pending data directory cleanup can be dismissed and deleted explicitly', (
|
||||
|
||||
const switchResult = createNodeDataDirSwitch({ systemDir, currentDir, targetDir, migrate: true })
|
||||
assert.equal(switchResult.success, true)
|
||||
assert.equal(applyPendingNodeDataDirMigration(systemDir).success, true)
|
||||
assert.equal(
|
||||
applyPendingNodeDataDirMigration(systemDir, {
|
||||
writeConfigField() {
|
||||
// Config persistence is covered by the preceding adapter-level test.
|
||||
},
|
||||
}).success,
|
||||
true
|
||||
)
|
||||
|
||||
const [cleanup] = getPendingDataDirCleanups(systemDir)
|
||||
assert.ok(cleanup)
|
||||
|
||||
Reference in new issue
Block a user