From 7efaaa6938fb98d611b247619d38fd285195d9c4 Mon Sep 17 00:00:00 2001 From: Ankush Kumar Garg Date: Thu, 25 Jun 2026 18:26:03 +0530 Subject: [PATCH 1/2] missing parameter fix in workflow --- .github/workflows/deploy_and_Integration_test.yml | 4 ++++ .../workflows/multiTenant_deploy_and_Integration_test.yml | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/deploy_and_Integration_test.yml b/.github/workflows/deploy_and_Integration_test.yml index 36b810d8..2cee26f6 100644 --- a/.github/workflows/deploy_and_Integration_test.yml +++ b/.github/workflows/deploy_and_Integration_test.yml @@ -205,6 +205,8 @@ jobs: --arg cmisUrl "${{ env.CMIS_URL }}" \ --arg cmisClientID "${{ env.CMIS_CLIENT_ID }}" \ --arg cmisClientSecret "${{ env.CMIS_CLIENT_SECRET }}" \ + --arg defaultRepositoryID "${{ secrets.DEFAULTREPOSITORYID }}" \ + --arg virusScanRepositoryID "${{ secrets.VIRUSSCANREPOSITORYID }}" \ ' .appUrl = $appUrl | .authUrl = $authUrl @@ -217,6 +219,8 @@ jobs: | .CMIS_URL = $cmisUrl | .cmisClientID = $cmisClientID | .cmisClientSecret = $cmisClientSecret + | .defaultRepositoryID = $defaultRepositoryID + | .virusScanRepositoryID = $virusScanRepositoryID ' "$JSON_FILE" > "temp.json" ) mv "temp.json" "$JSON_FILE" diff --git a/.github/workflows/multiTenant_deploy_and_Integration_test.yml b/.github/workflows/multiTenant_deploy_and_Integration_test.yml index 69455dce..d2a95904 100644 --- a/.github/workflows/multiTenant_deploy_and_Integration_test.yml +++ b/.github/workflows/multiTenant_deploy_and_Integration_test.yml @@ -211,6 +211,9 @@ jobs: --arg cmisUrl "${{ env.CMIS_URL }}" \ --arg cmisClientIDMT "${{ env.CMIS_CLIENT_ID_MT }}" \ --arg cmisClientSecretMT "${{ env.CMIS_CLIENT_SECRET_MT }}" \ + --arg defaultRepositoryIDMT "${{ secrets.DEFAULTREPOSITORYIDMT }}" \ + --arg defaultRepositoryID "${{ secrets.DEFAULTREPOSITORYID }}" \ + --arg virusScanRepositoryID "${{ secrets.VIRUSSCANREPOSITORYID }}" \ ' .username = $username | .password = $password @@ -224,6 +227,9 @@ jobs: | .CMIS_URL = $cmisUrl | .cmisClientIDMT = $cmisClientIDMT | .cmisClientSecretMT = $cmisClientSecretMT + | .defaultRepositoryIDMT = $defaultRepositoryIDMT + | .defaultRepositoryID = $defaultRepositoryID + | .virusScanRepositoryID = $virusScanRepositoryID ' "$JSON_FILE" > "temp.json" ) mv "temp.json" "$JSON_FILE" From 3c36e555a3e2bf45417420e1096e73d25f1393e3 Mon Sep 17 00:00:00 2001 From: Ankush Kumar Garg Date: Fri, 26 Jun 2026 16:23:44 +0530 Subject: [PATCH 2/2] test cases fix --- test/integration/attachments-sdm.test.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/test/integration/attachments-sdm.test.js b/test/integration/attachments-sdm.test.js index 124aa5aa..bb653671 100644 --- a/test/integration/attachments-sdm.test.js +++ b/test/integration/attachments-sdm.test.js @@ -1822,9 +1822,13 @@ const config = { } expect(response.data.createdBy).toBeTruthy(); expect(response.data.modifiedBy).toBeTruthy(); - // When using named user token, createdBy should match the authenticated username - if (credentials.username) { + // When using named user token, createdBy should match the authenticated username. + // For technicalUser flow, the principal is the client_credentials clientid (not a named user), + // so createdBy must NOT equal the named user. + if (tokenFlow === 'namedUser' && credentials.username) { expect(response.data.createdBy).toBe(credentials.username); + } else if (tokenFlow === 'technicalUser' && credentials.username) { + expect(response.data.createdBy).not.toBe(credentials.username); } // Cleanup @@ -2032,7 +2036,13 @@ describe.only('Attachments Integration Tests --CMIS METADATA', () => { const { getCmisProperty } = require('./utills/cmis-document-helper'); const createdBy = await getCmisProperty(metadataEntityID, "metadata-test.pdf", "cmis:createdBy"); expect(createdBy).toBeTruthy(); - expect(createdBy).toBe(credentials.username); + // For namedUser flow, SDM's cmis:createdBy is the authenticated user. + // For technicalUser flow, it's the client_credentials clientid — must NOT match the named user. + if (tokenFlow === 'namedUser') { + expect(createdBy).toBe(credentials.username); + } else if (tokenFlow === 'technicalUser') { + expect(createdBy).not.toBe(credentials.username); + } console.log(`SDM createdBy field verified: ${createdBy}`); // Cleanup