Skip to content

Commit

Permalink
integration test with rows affected
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper committed Oct 17, 2023
1 parent 9c5af21 commit ce1f4dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion database/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,15 @@ func testExecutables(t *testing.T, db Interface, resources *Resources) {
t.Errorf("unable to create executable %d: %v", resources.Executables[0].GetID(), err)
}

err = db.CleanBuildExecutables(context.TODO())
count, err := db.CleanBuildExecutables(context.TODO())
if err != nil {
t.Errorf("unable to clean executable %d: %v", resources.Executables[0].GetID(), err)
}

if count != 1 {
t.Errorf("CleanBuildExecutables should have affected 1 row, affected %d", count)
}

_, err = db.PopBuildExecutable(context.TODO(), resources.Builds[0].GetID())
if err == nil {
t.Errorf("build executable not cleaned")
Expand Down

0 comments on commit ce1f4dc

Please sign in to comment.