Open shazron opened 1 week ago
aio-lib-console e2e tests are not run daily because of this
13 failures.
❯ npm run e2e > @adobe/aio-lib-console@5.3.1 e2e > jest --config e2e/jest.config.js FAIL e2e/e2e.js (68.093 s) init and input checks ✓ sdk init test (1 ms) ✓ bad access token (831 ms) ✓ bad api key (808 ms) organizations ✓ getOrganizations API (741 ms) ✕ getProjectsForOrg API (1627 ms) create, edit, get ✓ createFireflyProject API (1013 ms) ✓ createProject API (default project type) (855 ms) ✓ editProject API (default project type) (838 ms) ✓ editProject API for firefly project (789 ms) ✓ getProject API (default type) (965 ms) ✓ getProject API (firefly project type) (893 ms) ✓ getApplicationExtensions (799 ms) ✕ createWorkspace API for default project type - should fail because only one is allowed for a default project (812 ms) ✓ deleteWorkspace API for default project type (to delete the default workspace) (2116 ms) ✓ createWorkspace API for default project type (845 ms) ✓ createWorkspace API for firefly project type (936 ms) ✓ update endpoints for workspace API (947 ms) ✓ get endpoints for workspace API (5949 ms) ✓ getWorkspacesForProject API for firefly project type (811 ms) ✓ getWorkspacesForProject API for default project type (780 ms) ✓ editWorkspace API for default project type (855 ms) ✓ editWorkspace API for firefly project type (804 ms) ✓ getWorkspace API for default project type (783 ms) ✓ getWorkspace API for firefly project type (825 ms) ✓ getProjectForWorkspace API for default project type (789 ms) ✓ getProjectForWorkspace API for firefly project type (874 ms) Workspace credential test Enterprise credentials ✕ createEnterpriseCredential API (987 ms) ✕ getCredentials API (service) (2 ms) ✕ getSDKProperties (1 ms) ✕ subscribeCredentialToServices API (AdobeIOManagementAPISDK) (2 ms) ✕ downloadWorkspaceJson API (1 ms) ✕ getIntegration API (1 ms) ✕ getIntegrationSecrets API (3 ms) ✕ uploadAndBindCertificate API ✕ deleteCredential API (integrationType: entp) (1 ms) AdobeID credentials ✓ createAdobeIdCredential API (1510 ms) ✓ getCredentials API (oauthweb) (789 ms) ✓ subscribeCredentialToServices API (Adobe Stock) (2699 ms) ✓ getWorkspaceForCredential API (809 ms) ✓ getIntegration API (1393 ms) ✓ getIntegrationSecrets API (984 ms) ✓ deleteCredential API (integrationType: adobeid) (1828 ms) ○ skipped getAtlasApplicationPolicy API ○ skipped getAtlasQuotaUsage API OAuth Server-to-Server credentials ✓ createOAuthServerToServerCredential API (1586 ms) ✓ getCredentials API (service) (817 ms) ✓ getSDKProperties (1233 ms) ✓ subscribeOAuthServerToServerIntegrationToServices API (AdobeIOManagementAPISDK) (1451 ms) ✓ downloadWorkspaceJson API (1065 ms) ✓ getIntegration API (979 ms) ✓ getIntegrationSecrets API (938 ms) ✓ deleteCredential API (integrationType: oauth_server_to_server) (1821 ms) Extension API tests ✓ getAllExtensionPoints (820 ms) dev terms ✓ get dev terms (1348 ms) ✓ check dev terms (826 ms) ✓ accept dev terms (917 ms) Organization Integration tests Enterprise integration ○ skipped createEnterpriseIntegration API ○ skipped getIntegrationsForOrg API (service) ○ skipped subscribeIntegrationToServices API (AdobeIOManagementAPISDK) ○ skipped deleteIntegration API (integrationType: entp) AdobeID integration ○ skipped createAdobeIdIntegration API ○ skipped getIntegrationsForOrg API (oauthweb) ○ skipped subscribeIntegrationToServices API (Adobe Stock) ○ skipped deleteIntegration API (integrationType: adobeid) create, edit, get, delete: test trailing spaces ✓ trailing spaces for firefly project (2680 ms) ✓ trailing spaces for firefly workspace (2601 ms) ✓ deleteProject API (default type) (1925 ms) ✕ deleteProject API (firefly project template) (2222 ms) ✕ delete (4294 ms) ● organizations › getProjectsForOrg API expect(received).toEqual(expected) // deep equality Expected: ArrayContaining ["name", "org_id", "who_created", "description", "appId", "id"] Received: ["id", "name", "title", "description", "type", "enabled", "deleted", "org_id", "date_created", "date_last_modified", …] 93 | expect(res.ok).toBe(true) 94 | expect(Array.isArray(res.body)).toBe(true) > 95 | expect(Object.keys(res.body[0])).toEqual(expect.arrayContaining(['name', 'org_id', 'who_created', 'description', 'appId', 'id'])) | ^ 96 | }) 97 | }) 98 | at Object.toEqual (e2e.js:95:38) ● create, edit, get › createWorkspace API for default project type - should fail because only one is allowed for a default project expect(received).rejects.toEqual(expected) // deep equality Expected: [CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_CREATE_WORKSPACE] 400 - Bad Request ("Only one workspace allowed for project type default")] Received: [CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_CREATE_WORKSPACE] 400 - Bad Request ({"id":"d479a29e-b7d3-4c46-9a20-281616233eff","messages":[{"template":"ERR_MSG_GENERIC_MESSAGE","message":"Only one workspace allowed for project type default"}]})] 208 | 209 | const res = sdkClient.createWorkspace(orgId, projectId, { name: workspaceName, description: workspaceDescription }) > 210 | await expect(res).rejects.toEqual( | ^ 211 | new codes.ERROR_CREATE_WORKSPACE({ 212 | messageValues: '400 - Bad Request ("Only one workspace allowed for project type default")' 213 | })) at Object.toEqual (../node_modules/expect/build/index.js:218:22) at Object.toEqual (e2e.js:210:31) ● Workspace credential test › Enterprise credentials › createEnterpriseCredential API CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_CREATE_ENTERPRISE_CREDENTIAL] 400 - Bad Request ({"id":"1a9de972-108d-432c-a6a3-e70ba41ae3fd","messages":[{"template":"ERR_MSG_GENERIC_MESSAGE","message":"Name is mandatory, Description is mandatory"}]}) 598 | return res 599 | } catch (err) { > 600 | throw new codes.ERROR_CREATE_ENTERPRISE_CREDENTIAL({ sdkDetails, messageValues: reduceError(err) }) | ^ 601 | } 602 | } 603 | at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9) at CoreConsoleAPI.createEnterpriseCredential (../src/index.js:600:13) at Object.<anonymous> (e2e.js:410:19) ● Workspace credential test › Enterprise credentials › getCredentials API (service) expect(received).toBeDefined() Received: undefined 416 | 417 | test('getCredentials API (service)', async () => { > 418 | expect(credentialId).toBeDefined() // if not, createEnterpriseIntegration test failed | ^ 419 | expect(orgId).toBeDefined() 420 | expect(projectId).toBeDefined() 421 | expect(workspaceId).toBeDefined() at Object.toBeDefined (e2e.js:418:28) ● Workspace credential test › Enterprise credentials › getSDKProperties expect(received).toBeDefined() Received: undefined 435 | test('getSDKProperties', async () => { 436 | expect(orgId).toBeDefined() > 437 | expect(fromCredentialId).toBeDefined() | ^ 438 | 439 | const anyValidSDKCodeIsFine = 'AdobeAnalyticsSDK' 440 | const res = await sdkClient.getSDKProperties(orgId, fromCredentialId, anyValidSDKCodeIsFine) at Object.toBeDefined (e2e.js:437:32) ● Workspace credential test › Enterprise credentials › subscribeCredentialToServices API (AdobeIOManagementAPISDK) expect(received).toBeDefined() Received: undefined 445 | 446 | test('subscribeCredentialToServices API (AdobeIOManagementAPISDK)', async () => { > 447 | expect(credentialId).toBeDefined() // if not, createEnterpriseIntegration test failed | ^ 448 | expect(orgId).toBeDefined() 449 | expect(projectId).toBeDefined() 450 | expect(workspaceId).toBeDefined() at Object.toBeDefined (e2e.js:447:28) ● Workspace credential test › Enterprise credentials › downloadWorkspaceJson API expect(received).toBeDefined() Received: undefined 466 | 467 | test('downloadWorkspaceJson API', async () => { > 468 | expect(credentialId).toBeDefined() // if not, createEnterpriseIntegration test failed | ^ 469 | expect(orgId).toBeDefined() 470 | expect(projectId).toBeDefined() 471 | expect(workspaceId).toBeDefined() at Object.toBeDefined (e2e.js:468:28) ● Workspace credential test › Enterprise credentials › getIntegration API expect(received).toBeDefined() Received: undefined 488 | 489 | test('getIntegration API', async () => { > 490 | expect(credentialId).toBeDefined() // if not, createEnterpriseIntegration test failed | ^ 491 | expect(orgId).toBeDefined() 492 | const res = await sdkClient.getIntegration(orgId, credentialId) 493 | expect(res.ok).toBe(true) at Object.toBeDefined (e2e.js:490:28) ● Workspace credential test › Enterprise credentials › getIntegrationSecrets API expect(received).toBeDefined() Received: undefined 500 | 501 | test('getIntegrationSecrets API', async () => { > 502 | expect(credentialId).toBeDefined() // if not, createEnterpriseIntegration test failed | ^ 503 | expect(orgId).toBeDefined() 504 | const res = await sdkClient.getIntegrationSecrets(orgId, credentialId) 505 | expect(res.ok).toBe(true) at Object.toBeDefined (e2e.js:502:28) ● Workspace credential test › Enterprise credentials › uploadAndBindCertificate API expect(received).toBeDefined() Received: undefined 511 | 512 | test('uploadAndBindCertificate API', async () => { > 513 | expect(credentialId).toBeDefined() // if not, createEnterpriseIntegration test failed | ^ 514 | 515 | expect(orgId).toBeDefined() 516 | at Object.toBeDefined (e2e.js:513:28) ● Workspace credential test › Enterprise credentials › deleteCredential API (integrationType: entp) expect(received).toBeDefined() Received: undefined 526 | // delete 527 | test('deleteCredential API (integrationType: entp)', async () => { > 528 | expect(credentialId).toBeDefined() // if not, createEnterpriseIntegration test failed | ^ 529 | expect(orgId).toBeDefined() 530 | expect(projectId).toBeDefined() 531 | expect(workspaceId).toBeDefined() at Object.toBeDefined (e2e.js:528:28) ● create, edit, get, delete: test trailing spaces › deleteProject API (firefly project template) expect(received).rejects.toThrow() Received promise resolved instead of rejected Resolved to value: {"data": {Symbol(type): "", Symbol(buffer): {"data": [], "type": "Buffer"}}, "headers": {"access-control-allow-origin": "*", "connection": "close", "content-length": "0", "date": ["Tue", "12 Nov 2024 11:05:42 GMT"], "server": "openresty", "x-correlation-id": "xmE4BQhBmqNdselndP51y1mhyrXRfTKC", "x-powered-by": "Express", "x-request-id": "xmE4BQhBmqNdselndP51y1mhyrXRfTKC"}, "ok": true, "status": 200, "statusText": "OK", "text": {Symbol(type): "", Symbol(buffer): {"data": [], "type": "Buffer"}}, "url": "https://developers.adobe.io/console/organizations/52381/projects/4566206088345293839"} 1056 | 1057 | // TODO: delete is not supported yet > 1058 | await expect(sdkClient.deleteProject(orgId, fireflyProjectId)).rejects.toThrow('[CoreConsoleAPISDK:ERROR_DELETE_PROJECT] 400 - Bad Request ("Project Firefly can not be deleted")') | ^ 1059 | }) 1060 | 1061 | test('delete', async () => { at expect (../node_modules/expect/build/index.js:113:15) at Object.expect (e2e.js:1058:11) ● create, edit, get, delete: test trailing spaces › delete expect(received).rejects.toThrow() Received promise resolved instead of rejected Resolved to value: {"data": {Symbol(type): "", Symbol(buffer): {"data": [], "type": "Buffer"}}, "headers": {"access-control-allow-origin": "*", "connection": "close", "content-length": "0", "date": ["Tue", "12 Nov 2024 11:05:47 GMT"], "server": "openresty", "x-correlation-id": "VIjiiabyXcP0eu9YX59Ns2FqOkAGICIN", "x-powered-by": "Express", "x-request-id": "VIjiiabyXcP0eu9YX59Ns2FqOkAGICIN"}, "ok": true, "status": 200, "statusText": "OK", "text": {Symbol(type): "", Symbol(buffer): {"data": [], "type": "Buffer"}}, "url": "https://developers.adobe.io/console/organizations/52381/projects/4566206088345293843"} 1070 | 1071 | // TODO: delete is not supported yet > 1072 | await expect(sdkClient.deleteProject(orgId, trailingProjectId)).rejects.toThrow('[CoreConsoleAPISDK:ERROR_DELETE_PROJECT] 400 - Bad Request ("Project Firefly can not be deleted")') | ^ 1073 | }) 1074 | }) 1075 | at expect (../node_modules/expect/build/index.js:113:15) at Object.expect (e2e.js:1072:11) Test Suites: 1 failed, 1 total Tests: 13 failed, 10 skipped, 46 passed, 69 total Snapshots: 0 total Time: 68.121 s Ran all test suites.
JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-3276
aio-lib-console e2e tests are not run daily because of this
13 failures.