소스 검색

fix: flaky test

Fela Maslen 5 년 전
부모
커밋
2246fbbb96
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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, `