Exemplo n.º 1
0
func teardownForms(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 forms : %v", tests.Failed, err)
	}
	t.Logf("%s\tShould be able to remove the forms.", tests.Success)

	db.CloseMGO(tests.Context)
	tests.DisplayLog()
}
Exemplo n.º 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()
}