mirror of
https://github.com/gogs/gogs.git
synced 2025-05-26 01:11:53 +00:00
database: lock mock properly to avoid data race in tests (#7869)
Fixes tests data race found in https://github.com/gogs/gogs/actions/runs/12457230279/job/34771555537
This commit is contained in:
parent
009a1855aa
commit
b09f317aa0
@ -706,6 +706,7 @@ func actionsPushTag(t *testing.T, ctx context.Context, s *ActionsStore) {
|
||||
// NOTE: We set a noop mock here to avoid data race with other tests that writes
|
||||
// to the mock server because this function holds a lock.
|
||||
conf.SetMockServer(t, conf.ServerOpts{})
|
||||
conf.SetMockSSH(t, conf.SSHOpts{})
|
||||
|
||||
alice, err := newUsersStore(s.db).Create(ctx, "alice", "alice@example.com", CreateUserOptions{})
|
||||
require.NoError(t, err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user