From 727da3014fd967968cdb9742883f073cb8d16164 Mon Sep 17 00:00:00 2001 From: Baha Aiman Date: Fri, 24 May 2024 10:22:47 -0700 Subject: [PATCH] test(firestore): Cleanup documents created during test run (#10188) --- firestore/integration_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/firestore/integration_test.go b/firestore/integration_test.go index 9874e09f2aea..36c710378b8e 100644 --- a/firestore/integration_test.go +++ b/firestore/integration_test.go @@ -2478,10 +2478,15 @@ func TestIntegration_AggregationQueries(t *testing.T) { {"weight": 7.1, "height": 93, "model": "C"}, {"weight": 8.2, "height": 93, "model": "A"}, } + docRefs := []*DocumentRef{} for _, doc := range docs { newDoc := coll.NewDoc() + docRefs = append(docRefs, newDoc) h.mustCreate(newDoc, doc) } + t.Cleanup(func() { + deleteDocuments(docRefs) + }) query := coll.Where("weight", ">=", 1)