1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-23 12:29:09 +00:00

Drop tables instead of removing the database completely (#807)

* Add drop tables

* Fix deadlock

* Use f.Stop in tests

* Rename dropAllStmtFmt to dropBaseStmtFmt

* Fix comment

* More dropAll->dropBase renaming
This commit is contained in:
Tom Lebreux
2025-09-09 15:52:02 -04:00
committed by GitHub
parent 7cff39371f
commit ca3fa10db5
13 changed files with 257 additions and 39 deletions

View File

@@ -60,7 +60,9 @@ func TestNewIndexer(t *testing.T) {
})
store.EXPECT().RegisterAfterAdd(gomock.Any())
store.EXPECT().RegisterAfterUpdate(gomock.Any())
store.EXPECT().RegisterBeforeDropAll(gomock.Any())
store.EXPECT().Prepare(fmt.Sprintf(deleteIndicesFmt, storeName))
store.EXPECT().Prepare(fmt.Sprintf(dropIndicesFmt, storeName))
store.EXPECT().Prepare(fmt.Sprintf(addIndexFmt, storeName))
store.EXPECT().Prepare(fmt.Sprintf(listByIndexFmt, storeName, storeName))
store.EXPECT().Prepare(fmt.Sprintf(listKeyByIndexFmt, storeName))