Example #1
0
func teardown(t *testing.T, db *db.DB) {
	if err := submissionfix.Remove(tests.Context, db, prefix); err != nil {
		t.Fatalf("%s\tShould be able to remove the submissions : %v", tests.Failed, err)
	}
	t.Logf("%s\tShould be able to remove the submissions.", tests.Success)

	db.CloseMGO(tests.Context)
	tests.DisplayLog()
}
Example #2
0
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()
}