Skip to content

Commit b199bc3

Browse files
committed
Yet another attempt to fix the race in gpg_git_test
1 parent 055f6d2 commit b199bc3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

integrations/gpg_git_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ func TestGPGGit(t *testing.T) {
170170

171171
t.Run("AlwaysSign-Initial-CRUD-Never", func(t *testing.T) {
172172
defer PrintCurrentTest(t)()
173-
testCtx := NewAPITestContext(t, username, "initial-always")
173+
testCtx := NewAPITestContext(t, username, "initial-always-never")
174+
t.Run("CreateRepository", doAPICreateRepository(testCtx, false))
174175
t.Run("CreateCRUDFile-Never", crudActionCreateFile(
175176
t, testCtx, user, "master", "never", "unsigned-never.txt", func(t *testing.T, response api.FileResponse) {
176177
assert.False(t, response.Verification.Verified)
@@ -180,10 +181,10 @@ func TestGPGGit(t *testing.T) {
180181
setting.Repository.Signing.CRUDActions = []string{"parentsigned"}
181182
onGiteaRun(t, func(t *testing.T, u *url.URL) {
182183
u.Path = baseAPITestContext.GitPath()
183-
184184
t.Run("AlwaysSign-Initial-CRUD-ParentSigned-On-Always", func(t *testing.T) {
185185
defer PrintCurrentTest(t)()
186-
testCtx := NewAPITestContext(t, username, "initial-always")
186+
testCtx := NewAPITestContext(t, username, "initial-always-parent")
187+
t.Run("CreateRepository", doAPICreateRepository(testCtx, false))
187188
t.Run("CreateCRUDFile-ParentSigned", crudActionCreateFile(
188189
t, testCtx, user, "master", "parentsigned", "signed-parent.txt", func(t *testing.T, response api.FileResponse) {
189190
assert.True(t, response.Verification.Verified)
@@ -197,7 +198,8 @@ func TestGPGGit(t *testing.T) {
197198

198199
t.Run("AlwaysSign-Initial-CRUD-Always", func(t *testing.T) {
199200
defer PrintCurrentTest(t)()
200-
testCtx := NewAPITestContext(t, username, "initial-always")
201+
testCtx := NewAPITestContext(t, username, "initial-always-always")
202+
t.Run("CreateRepository", doAPICreateRepository(testCtx, false))
201203
t.Run("CreateCRUDFile-Always", crudActionCreateFile(
202204
t, testCtx, user, "master", "always", "signed-always.txt", func(t *testing.T, response api.FileResponse) {
203205
assert.True(t, response.Verification.Verified)

0 commit comments

Comments
 (0)