diff --git a/internal/db/organizations_test.go b/internal/db/organizations_test.go
index 4431d5ad5..e6c9c0923 100644
--- a/internal/db/organizations_test.go
+++ b/internal/db/organizations_test.go
@@ -208,6 +208,8 @@ func orgsList(t *testing.T, ctx context.Context, db *organizations) {
 func orgsSearchByName(t *testing.T, ctx context.Context, db *organizations) {
 	tempPictureAvatarUploadPath := filepath.Join(os.TempDir(), "orgsSearchByName-tempPictureAvatarUploadPath")
 	conf.SetMockPicture(t, conf.PictureOpts{AvatarUploadPath: tempPictureAvatarUploadPath})
+	tempRepositoryRoot := filepath.Join(os.TempDir(), "orgsSearchByName-tempRepositoryRoot")
+	conf.SetMockRepository(t, conf.RepositoryOpts{Root: tempRepositoryRoot})
 
 	org1, err := db.Create(ctx, "org1", 1, CreateOrganizationOptions{FullName: "Acme Corp"})
 	require.NoError(t, err)
diff --git a/internal/db/users_test.go b/internal/db/users_test.go
index b2d7a6c50..1edc09f82 100644
--- a/internal/db/users_test.go
+++ b/internal/db/users_test.go
@@ -277,12 +277,7 @@ func usersChangeUsername(t *testing.T, ctx context.Context, db *users) {
 	})
 
 	tempRepositoryRoot := filepath.Join(os.TempDir(), "usersChangeUsername-tempRepositoryRoot")
-	conf.SetMockRepository(
-		t,
-		conf.RepositoryOpts{
-			Root: tempRepositoryRoot,
-		},
-	)
+	conf.SetMockRepository(t, conf.RepositoryOpts{Root: tempRepositoryRoot})
 	err = os.RemoveAll(tempRepositoryRoot)
 	require.NoError(t, err)
 	defer func() { _ = os.RemoveAll(tempRepositoryRoot) }()