Skip to content

Commit

Permalink
capture error state
Browse files Browse the repository at this point in the history
  • Loading branch information
mfridman committed May 11, 2024
1 parent 49d4f25 commit 1711e66
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions provider_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,9 @@ func TestNoVersioning(t *testing.T) {
upResult, err := p.Up(ctx)
check.NoError(t, err)
check.Number(t, len(upResult), 2)
// Confirm no changes to the versioned schema in the DB
currentVersion, err := p.GetDBVersion(ctx)
check.NoError(t, err)
check.Number(t, baseVersion, currentVersion)
// When versioning is disabled, we cannot track the version of the seed files.
_, err = p.GetDBVersion(ctx)
check.HasError(t, err)
seedOwnerCount, err := countSeedOwners(db)
check.NoError(t, err)
check.Number(t, seedOwnerCount, wantSeedOwnerCount)
Expand All @@ -519,10 +518,9 @@ func TestNoVersioning(t *testing.T) {
downResult, err := p.DownTo(ctx, 0)
check.NoError(t, err)
check.Number(t, len(downResult), 2)
// Confirm no changes to the versioned schema in the DB
currentVersion, err := p.GetDBVersion(ctx)
check.NoError(t, err)
check.Number(t, baseVersion, currentVersion)
// When versioning is disabled, we cannot track the version of the seed files.
_, err = p.GetDBVersion(ctx)
check.HasError(t, err)
seedOwnerCount, err := countSeedOwners(db)
check.NoError(t, err)
check.Number(t, seedOwnerCount, 0)
Expand Down

0 comments on commit 1711e66

Please sign in to comment.