Skip to content

Commit

Permalink
fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper committed Aug 8, 2023
1 parent 342a738 commit c9595b4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions database/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ func testSchedules(t *testing.T, db Interface, resources *Resources) {

// create the schedules
for _, schedule := range resources.Schedules {
err := db.CreateSchedule(schedule)
_, err := db.CreateSchedule(schedule)
if err != nil {
t.Errorf("unable to create schedule %d: %v", schedule.GetID(), err)
}
Expand Down Expand Up @@ -1001,16 +1001,11 @@ func testSchedules(t *testing.T, db Interface, resources *Resources) {
// update the schedules
for _, schedule := range resources.Schedules {
schedule.SetUpdatedAt(time.Now().UTC().Unix())
err = db.UpdateSchedule(schedule, true)
got, err := db.UpdateSchedule(schedule, true)
if err != nil {
t.Errorf("unable to update schedule %d: %v", schedule.GetID(), err)
}

// lookup the schedule by ID
got, err := db.GetSchedule(schedule.GetID())
if err != nil {
t.Errorf("unable to get schedule %d by ID: %v", schedule.GetID(), err)
}
if !reflect.DeepEqual(got, schedule) {
t.Errorf("GetSchedule() is %v, want %v", got, schedule)
}
Expand Down

0 comments on commit c9595b4

Please sign in to comment.