Skip to content

Commit 2e5471d

Browse files
committed
Try changing doer user in test to avoid conflicts with other tests
1 parent 8843b8b commit 2e5471d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

models/fixtures/access.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,6 @@
174174

175175
-
176176
id: 30
177-
user_id: 4
177+
user_id: 40
178178
repo_id: 1
179179
mode: 2

tests/integration/api_branch_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ func TestAPIUpdateBranch(t *testing.T) {
206206
})
207207
t.Run("UpdateBranchWithNonAdminDoer", func(t *testing.T) {
208208
// don't allow default branch renaming
209-
resp := testAPIUpdateBranch(t, "user4", "user2", "repo1", "master", "new-branch-name", http.StatusForbidden)
209+
resp := testAPIUpdateBranch(t, "user40", "user2", "repo1", "master", "new-branch-name", http.StatusForbidden)
210210
assert.Contains(t, resp.Body.String(), "User must be a repo or site admin to rename default or protected branches.")
211211

212212
// don't allow protected branch renaming
@@ -216,7 +216,7 @@ func TestAPIUpdateBranch(t *testing.T) {
216216
}).AddTokenAuth(token)
217217
MakeRequest(t, req, http.StatusCreated)
218218
testAPICreateBranchProtection(t, "protected-branch", 1, http.StatusCreated)
219-
resp = testAPIUpdateBranch(t, "user4", "user2", "repo1", "protected-branch", "new-branch-name", http.StatusForbidden)
219+
resp = testAPIUpdateBranch(t, "user40", "user2", "repo1", "protected-branch", "new-branch-name", http.StatusForbidden)
220220
assert.Contains(t, resp.Body.String(), "User must be a repo or site admin to rename default or protected branches.")
221221
})
222222
t.Run("RenameBranchNormalScenario", func(t *testing.T) {

0 commit comments

Comments
 (0)