diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2026-11-13 21:43:11 -0800 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2026-11-13 21:43:11 -0800 |
| commit | 28dd0bfc1373746b8c056a211f068da71fdc80b2 (patch) | |
| tree | 9c04a08501bc5abe7413263f60eaa55400dd162f /internal/bolttest/mock_migration_dependency_graph.go | |
| parent | Release v0.13.1 (diff) | |
| download | cli-28dd0bfc1373746b8c056a211f068da71fdc80b2.zip | |
Remove migration dependencies
Diffstat (limited to 'internal/bolttest/mock_migration_dependency_graph.go')
| -rw-r--r-- | internal/bolttest/mock_migration_dependency_graph.go | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/internal/bolttest/mock_migration_dependency_graph.go b/internal/bolttest/mock_migration_dependency_graph.go deleted file mode 100644 index 1d73ca4..0000000 --- a/internal/bolttest/mock_migration_dependency_graph.go +++ /dev/null @@ -1,65 +0,0 @@ -package bolttest - -import "git.sr.ht/~eugenetriguba/bolt/internal/models" - -type MockMigrationDependencyGraph struct { - TopologicalSortReturnValue TopologicalSortReturnValue - TopologicalSortCallCount int - ReverseTopologicalSortReturnValue ReverseTopologicalSortReturnValue - ReverseTopologicalSortCallCount int - CheckDependenciesAppliedReturnValue CheckDependenciesAppliedReturnValue - CheckDependenciesAppliedCallCount int - CheckNoDependentsAppliedReturnValue CheckNoDependentsAppliedReturnValue - CheckNoDependentsAppliedCallCount int - FindLeafNodesReturnValue FindLeafNodesReturnValue - FindLeafNodesCallCount int -} - -type TopologicalSortReturnValue struct { - Migrations []*models.Migration - Err error -} - -type ReverseTopologicalSortReturnValue = TopologicalSortReturnValue - -type CheckDependenciesAppliedReturnValue struct { - Err error -} - -type CheckNoDependentsAppliedReturnValue = CheckDependenciesAppliedReturnValue - -type FindLeafNodesReturnValue struct { - LeafNodes []string - Err error -} - -func (g *MockMigrationDependencyGraph) TopologicalSort(migrations []*models.Migration) ([]*models.Migration, error) { - g.TopologicalSortCallCount++ - return g.TopologicalSortReturnValue.Migrations, g.TopologicalSortReturnValue.Err -} - -func (g *MockMigrationDependencyGraph) ReverseTopologicalSort(migrations []*models.Migration) ([]*models.Migration, error) { - g.ReverseTopologicalSortCallCount++ - return g.ReverseTopologicalSortReturnValue.Migrations, g.ReverseTopologicalSortReturnValue.Err -} - -func (g *MockMigrationDependencyGraph) CheckDependenciesApplied( - migration *models.Migration, - allMigrations []*models.Migration, -) error { - g.CheckDependenciesAppliedCallCount++ - return g.CheckDependenciesAppliedReturnValue.Err -} - -func (g *MockMigrationDependencyGraph) CheckNoDependentsApplied( - migration *models.Migration, - allMigrations []*models.Migration, -) error { - g.CheckNoDependentsAppliedCallCount++ - return g.CheckNoDependentsAppliedReturnValue.Err -} - -func (g *MockMigrationDependencyGraph) FindLeafNodes(localMigrations map[string]*models.Migration) ([]string, error) { - g.FindLeafNodesCallCount++ - return g.FindLeafNodesReturnValue.LeafNodes, g.FindLeafNodesReturnValue.Err -} |