tests(db): fix data race (#7444)

[skip ci]
This commit is contained in:
Joe Chen
2023-05-08 23:02:45 -04:00
committed by GitHub
parent 5df9668063
commit ada1083462

View File

@@ -148,6 +148,8 @@ func actionsCommitRepo(t *testing.T, db *actions) {
now := time.Unix(1588568886, 0).UTC()
conf.SetMockSSH(t, conf.SSHOpts{})
t.Run("new commit", func(t *testing.T) {
t.Cleanup(func() {
err := db.Session(&gorm.Session{AllowGlobalUpdate: true}).WithContext(ctx).Delete(new(Action)).Error