mirror of https://github.com/gogs/gogs.git
fixup
parent
26f8ddfca0
commit
0ca926e87b
|
@ -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)
|
||||
|
|
|
@ -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) }()
|
||||
|
|
Loading…
Reference in New Issue