From 447b7518c6daf2d866134159eeeec76e0b45e846 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 1 Dec 2025 22:43:28 -0800 Subject: [PATCH] Fix test --- tests/integration/api_branch_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/api_branch_test.go b/tests/integration/api_branch_test.go index 821ad2358e..043aa10c7f 100644 --- a/tests/integration/api_branch_test.go +++ b/tests/integration/api_branch_test.go @@ -297,13 +297,13 @@ func TestAPIUpdateBranchReference(t *testing.T) { NewCommitID: newCommit, OldCommitID: featureInitialCommit, }).AddTokenAuth(ctx.Token) - ctx.Session.MakeRequest(t, staleReq, http.StatusConflict) + ctx.Session.MakeRequest(t, staleReq, http.StatusUnprocessableEntity) nonFFReq := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/branches/%s", ctx.Username, ctx.Reponame, "feature"), &api.UpdateBranchRepoOption{ NewCommitID: featureInitialCommit, OldCommitID: newCommit, }).AddTokenAuth(ctx.Token) - ctx.Session.MakeRequest(t, nonFFReq, http.StatusConflict) + ctx.Session.MakeRequest(t, nonFFReq, http.StatusUnprocessableEntity) forceReq := NewRequestWithJSON(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/branches/%s", ctx.Username, ctx.Reponame, "feature"), &api.UpdateBranchRepoOption{ NewCommitID: featureInitialCommit,