From 0ca926e87b4ff301a9efbf5670ed13e884dbef4d Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sun, 12 Nov 2023 21:21:11 -0500 Subject: [PATCH] fixup --- internal/db/organizations_test.go | 2 ++ internal/db/users_test.go | 7 +------ 2 files changed, 3 insertions(+), 6 deletions(-) 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) }()