From c9595b42baaad9adcc8f7f1170c3422cc4761732 Mon Sep 17 00:00:00 2001 From: ecrupper Date: Tue, 8 Aug 2023 12:57:35 -0500 Subject: [PATCH] fix integration tests --- database/integration_test.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/database/integration_test.go b/database/integration_test.go index 2cebb815a..7d772f975 100644 --- a/database/integration_test.go +++ b/database/integration_test.go @@ -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) } @@ -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) }