mirror of
https://github.com/rancher/steve.git
synced 2025-09-24 04:49:53 +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:
@@ -99,6 +99,20 @@ func (mr *MockStoreMockRecorder) Delete(obj any) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStore)(nil).Delete), obj)
|
||||
}
|
||||
|
||||
// DropAll mocks base method.
|
||||
func (m *MockStore) DropAll(ctx context.Context) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DropAll", ctx)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// DropAll indicates an expected call of DropAll.
|
||||
func (mr *MockStoreMockRecorder) DropAll(ctx any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DropAll", reflect.TypeOf((*MockStore)(nil).DropAll), ctx)
|
||||
}
|
||||
|
||||
// Encryptor mocks base method.
|
||||
func (m *MockStore) Encryptor() db.Encryptor {
|
||||
m.ctrl.T.Helper()
|
||||
@@ -372,6 +386,18 @@ func (mr *MockStoreMockRecorder) RegisterAfterUpdate(f any) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterAfterUpdate", reflect.TypeOf((*MockStore)(nil).RegisterAfterUpdate), f)
|
||||
}
|
||||
|
||||
// RegisterBeforeDropAll mocks base method.
|
||||
func (m *MockStore) RegisterBeforeDropAll(f func(transaction.Client) error) {
|
||||
m.ctrl.T.Helper()
|
||||
m.ctrl.Call(m, "RegisterBeforeDropAll", f)
|
||||
}
|
||||
|
||||
// RegisterBeforeDropAll indicates an expected call of RegisterBeforeDropAll.
|
||||
func (mr *MockStoreMockRecorder) RegisterBeforeDropAll(f any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterBeforeDropAll", reflect.TypeOf((*MockStore)(nil).RegisterBeforeDropAll), f)
|
||||
}
|
||||
|
||||
// Replace mocks base method.
|
||||
func (m *MockStore) Replace(arg0 []any, arg1 string) error {
|
||||
m.ctrl.T.Helper()
|
||||
|
Reference in New Issue
Block a user