From 5231b5a5deae5263b61a20f8e7f8575cb542020f Mon Sep 17 00:00:00 2001 From: matthiasL-scality Date: Fri, 26 Jun 2026 15:28:39 +0200 Subject: [PATCH] fix(check-workflows): mock action-artifacts capability probe endpoints action-artifacts@4.3.0+ probes /presign-upload/ and /presign-upload-part/ before every upload to detect presigned/multipart capability. Without these nock intercepts the tests throw ERR_NOCK_NO_MATCH. Reply 404 so the action falls back to the standard upload path. Co-Authored-By: Claude Sonnet 4.6 --- tests/workflows/archive-artifacts.spec.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/workflows/archive-artifacts.spec.ts b/tests/workflows/archive-artifacts.spec.ts index c2709d190a..adcee25b29 100644 --- a/tests/workflows/archive-artifacts.spec.ts +++ b/tests/workflows/archive-artifacts.spec.ts @@ -133,6 +133,27 @@ beforeEach(async () => { body: [], }, }, + // action-artifacts@4.3.0+ probes these endpoints before each upload to detect + // presigned/multipart upload capability. Reply 404 = capability unavailable, + // which makes the action fall back to the basic upload path. + presignUpload: { + path: "/presign-upload/{name}/{file}", + method: "get", + parameters: { + query: [], + path: ["name", "file"], + body: [], + }, + }, + presignUploadPart: { + path: "/presign-upload-part/{name}/{file}", + method: "get", + parameters: { + query: ["partNumber", "uploadId"], + path: ["name", "file"], + body: [], + }, + }, }, }, }, @@ -173,6 +194,8 @@ function commonMockApi(...extraMocks: any[]) { mockapi.mock.artifacts.root.uploadKindLogs().reply({ status: 200, data: {}, repeat: 10 }), mockapi.mock.artifacts.root.uploadMergedReport().reply({ status: 200, data: {}, repeat: 10 }), mockapi.mock.artifacts.root.uploadLogsArchive().reply({ status: 200, data: {}, repeat: 10 }), + mockapi.mock.artifacts.root.presignUpload().reply({ status: 404, data: {}, repeat: 10 }), + mockapi.mock.artifacts.root.presignUploadPart().reply({ status: 404, data: {}, repeat: 10 }), ...extraMocks, ]; }