mirror of
https://github.com/gogs/gogs.git
synced 2025-05-28 02:02:09 +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
|
// 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.
|
// to the mock server because this function holds a lock.
|
||||||
conf.SetMockServer(t, conf.ServerOpts{})
|
conf.SetMockServer(t, conf.ServerOpts{})
|
||||||
|
conf.SetMockSSH(t, conf.SSHOpts{})
|
||||||
|
|
||||||
alice, err := newUsersStore(s.db).Create(ctx, "alice", "alice@example.com", CreateUserOptions{})
|
alice, err := newUsersStore(s.db).Create(ctx, "alice", "alice@example.com", CreateUserOptions{})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user