Skip to content

Commit

Permalink
test rollback doesn't fail
Browse files Browse the repository at this point in the history
  • Loading branch information
exekias committed Jan 15, 2024
1 parent 1beeeaf commit 84ce30e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/roll/execute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ func TestDisabledSchemaManagement(t *testing.T) {
t.Errorf("Expected schema %q to not exist", version)
}

if err := mig.Rollback(ctx); err != nil {
t.Fatalf("Failed to rollback migration: %v", err)
}

if err := mig.Start(ctx, &migrations.Migration{Name: version, Operations: migrations.Operations{createTableOp("table1")}}); err != nil {
t.Fatalf("Failed to start migration again: %v", err)
}

// complete the migration, check that the schema still doesn't exist
if err := mig.Complete(ctx); err != nil {
t.Fatalf("Failed to complete migration: %v", err)
Expand Down

0 comments on commit 84ce30e

Please sign in to comment.