jc/db-migrate-orgs
Joe Chen 2023-11-12 21:21:11 -05:00
parent 26f8ddfca0
commit 0ca926e87b
No known key found for this signature in database
GPG Key ID: 0BDE5280C552FF60
2 changed files with 3 additions and 6 deletions

View File

@ -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)

View File

@ -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) }()