diff options
Diffstat (limited to 'internal/bolttest')
| -rw-r--r-- | internal/bolttest/mock_migration_fs_repo.go | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/internal/bolttest/mock_migration_fs_repo.go b/internal/bolttest/mock_migration_fs_repo.go index 0932b37..ae933e3 100644 --- a/internal/bolttest/mock_migration_fs_repo.go +++ b/internal/bolttest/mock_migration_fs_repo.go @@ -5,10 +5,6 @@ import "github.com/eugenetriguba/bolt/internal/models" type MockMigrationFsRepo struct { CreateReturnValue CreateReturnValue CreateCallCount int - ExistsReturnValue ExistsReturnValue - ExistsCallCount int - GetReturnValue GetReturnValue - GetCallCount int ListReturnValue ListReturnValue ListCallCount int LatestReturnValue LatestReturnValue @@ -23,18 +19,11 @@ type CreateReturnValue struct { Err error } -type ExistsReturnValue struct { - Exists bool - Err error -} - -type GetReturnValue struct { +type LatestReturnValue struct { Migration *models.Migration Err error } -type LatestReturnValue = GetReturnValue - type ReadUpgradeScriptReturnValue struct { ScriptContents string Err error @@ -47,16 +36,6 @@ func (repo *MockMigrationFsRepo) Create(migration *models.Migration) error { return repo.CreateReturnValue.Err } -func (repo *MockMigrationFsRepo) Exists(version string) (bool, error) { - repo.ExistsCallCount += 1 - return repo.ExistsReturnValue.Exists, repo.ExistsReturnValue.Err -} - -func (repo *MockMigrationFsRepo) Get(version string) (*models.Migration, error) { - repo.GetCallCount += 1 - return repo.GetReturnValue.Migration, repo.GetReturnValue.Err -} - func (repo *MockMigrationFsRepo) List() (map[string]*models.Migration, error) { repo.ListCallCount += 1 return repo.ListReturnValue.Migrations, repo.ListReturnValue.Err |