func teardown(t *testing.T, db *db.DB) { if err := galleryfix.Remove(tests.Context, db, prefix); err != nil { t.Fatalf("%s\tShould be able to remove the galleries : %v", tests.Failed, err) } t.Logf("%s\tShould be able to remove the galleries.", tests.Success) db.CloseMGO(tests.Context) tests.DisplayLog() }
func teardown(t *testing.T, db *db.DB) { if err := formfix.Remove(tests.Context, db, prefix); err != nil { t.Fatalf("%s\tShould be able to remove the form fixtures from the database : %v", tests.Failed, err) } t.Logf("%s\tShould be able to remove the form fixtures from the database.", tests.Success) if err := galleryfix.Remove(tests.Context, db, prefix); err != nil { t.Fatalf("%s\tShould be able to remove the gallery fixtures from the database : %v", tests.Failed, err) } t.Logf("%s\tShould be able to remove the gallery fixtures from the database.", tests.Success) if err := submissionfix.Remove(tests.Context, db, prefix); err != nil { t.Fatalf("%s\tShould be able to remove the submission fixtures from the database : %v", tests.Failed, err) } t.Logf("%s\tShould be able to remove the submission fixtures from the database.", tests.Success) db.CloseMGO(tests.Context) tests.DisplayLog() }