Browse Source

fix: flaky test

Fela Maslen 5 năm trước cách đây
mục cha
commit
2246fbbb96
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      gmus-backend/pkg/repository/songs_test.go

+ 2 - 1
gmus-backend/pkg/repository/songs_test.go

@@ -172,8 +172,9 @@ var _ = Describe("songs repository", func() {
 			modifiedBatch[0].Title = "Title A modified"
 
 			BeforeEach(func() {
-				repository.BatchUpsertSongs(db, &songs, 2)
+				setup.PrepareDatabaseForTesting()
 
+				repository.BatchUpsertSongs(db, &songs, 2)
 				repository.BatchUpsertSongs(db, &modifiedBatch, 2)
 
 				db.Select(&result, `