From ebf7e2ea8c5b2471a98177c5c70e0a18ad0f1f77 Mon Sep 17 00:00:00 2001 From: Excellencedev Date: Wed, 24 Dec 2025 06:26:31 +0100 Subject: [PATCH] fix test --- tests/integration/actions_job_token_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/actions_job_token_test.go b/tests/integration/actions_job_token_test.go index 58c9483606..a939e6880f 100644 --- a/tests/integration/actions_job_token_test.go +++ b/tests/integration/actions_job_token_test.go @@ -384,11 +384,11 @@ func TestActionsCrossRepoAccess(t *testing.T) { assert.Equal(t, content, resp.Body.Bytes(), "Should be able to read package from other repo in same org") // Try to upload a package to org with task token from repo-A (cross-repo write) - // Cross-repo access should be read-only, so this should fail + // Cross-repo access should be read-only, write attempts return 401 Unauthorized writePackageURL := fmt.Sprintf("/api/packages/%s/generic/%s/%s/write-test.bin", orgName, packageName, packageVersion) writeReq := NewRequestWithBody(t, "PUT", writePackageURL, bytes.NewReader(content)) writeReq.Header.Set("Authorization", "Bearer "+task.Token) - MakeRequest(t, writeReq, http.StatusForbidden) + MakeRequest(t, writeReq, http.StatusUnauthorized) }) }) }