Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e failures #37

Closed
shazron opened this issue Jun 23, 2022 · 3 comments · Fixed by #40
Closed

e2e failures #37

shazron opened this issue Jun 23, 2022 · 3 comments · Fixed by #40
Labels
bug Something isn't working

Comments

@shazron
Copy link
Member

shazron commented Jun 23, 2022

Expand to see Test Log
❯ npm run e2e

> @adobe/aio-lib-console@3.2.0 e2e /Users/shazron/Documents/git/work/adobe/aio-lib-console
> jest --config e2e/jest.config.js

 FAIL  e2e/e2e.js (71.321 s)
  init and input checks
    ✓ sdk init test (1 ms)
    ✓ test bad access token (1339 ms)
    ✓ test bad api key (1062 ms)
  organizations
    ✓ test getOrganizations API (1249 ms)
    ✓ test getProjectsForOrg API (2185 ms)
  create, edit, get
    ✓ test createFireflyProject API (3267 ms)
    ✓ test createProject API (default project type) (1101 ms)
    ✓ test editProject API (default project type) (842 ms)
    ✓ test editProject API for firefly project (1053 ms)
    ✓ test getProject API (default type) (1100 ms)
    ✓ test getProject API (firefly project type) (1154 ms)
    ✓ test createWorkspace API for default project type - should fail because only one is allowed for a default project (1091 ms)
    ✓ test deleteWorkspace API for default project type (to delete the default workspace) (1153 ms)
    ✓ test createWorkspace API for default project type (1219 ms)
    ✓ test createWorkspace API for firefly project type (1380 ms)
    ✓ test getWorkspacesForProject API for firefly project type (1304 ms)
    ✓ test getWorkspacesForProject API for default project type (1100 ms)
    ✓ test editWorkspace API for default project type (1277 ms)
    ✓ test editWorkspace API for firefly project type (1275 ms)
    ✓ test getWorkspace API for default project type (1114 ms)
    ✓ test getWorkspace API for firefly project type (1016 ms)
    ✓ test getProjectForWorkspace API for default project type (1176 ms)
    ✓ test getProjectForWorkspace API for firefly project type (1420 ms)
  Workspace credential test
    Enterprise credentials
      ✓ test createEnterpriseCredential API (2715 ms)
      ✓ test getCredentials API (service) (1040 ms)
      ✓ test subscribeCredentialToServices API (AdobeIOManagementAPISDK) (2354 ms)
      ✓ test downloadWorkspaceJson API (2526 ms)
      ✓ test getIntegration API (1022 ms)
      ✓ test getIntegrationSecrets API (1456 ms)
      ✓ test uploadAndBindCertificate API (1636 ms)
      ✓ test deleteCredential API (integrationType: entp) (2613 ms)
    AdobeID credentials
      ✕ test createAdobeIdCredential API (1137 ms)
      ✕ test getCredentials API (oauthweb) (1 ms)
      ✕ test subscribeCredentialToServices API (Adobe Stock) (1 ms)
      ✕ test getWorkspaceForCredential API
      ✕ test getIntegration API
      ✕ test getIntegrationSecrets API
      ✕ test deleteCredential API (integrationType: adobeid)
  Extension API tests
    ✓ test get ALL ExtensionPoints API (1426 ms)
    ✕ test update endpoints for workspace API (1447 ms)
    ✕ test get endpoints for workspace API (1189 ms)
  delete workspace/project
    ✓ test deleteWorkspace API (1237 ms)
    ✓ test deleteWorkspace API for firefly project (1269 ms)
    ✓ test deleteProject API (default type) (1100 ms)
    ✕ test deleteProject API (firefly project template) (873 ms)
  dev terms
    ✓ get dev terms (1305 ms)
    ✓ check dev terms (1084 ms)
    ✓ accept dev terms (1173 ms)
  getSDKProperties
    ✕ getSDKProperties (1179 ms)
  create, edit, get, delete: test trailing spaces
    ✕ test trailing spaces for firefly project (6197 ms)
    ✓ test trailing spaces for firefly workspace (3630 ms)
    ✕ delete (2176 ms)

  ● Workspace credential test › AdobeID credentials › test createAdobeIdCredential API

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_CREATE_ADOBEID_CREDENTIAL] 400 - Bad Request ({"id":"e5a8b3e0-5966-4820-bb62-c70e94ff2979","messages":[{"template":"ERR_MSG_GENERIC_MESSAGE","message":"adobeid invalid platform Web"}]})

      523 |       return res
      524 |     } catch (err) {
    > 525 |       throw new codes.ERROR_CREATE_ADOBEID_CREDENTIAL({ sdkDetails, messageValues: reduceError(err) })
          |             ^
      526 |     }
      527 |   }
      528 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.createAdobeIdCredential (../src/index.js:525:13)
      at Object.<anonymous> (e2e.js:495:19)

  ● Workspace credential test › AdobeID credentials › test getCredentials API (oauthweb)

    expect(received).toBeDefined()

    Received: undefined

      503 |
      504 |     test('test getCredentials API (oauthweb)', async () => {
    > 505 |       expect(credentialId).toBeDefined() // if not, createAdobeIdCredential test failed
          |                            ^
      506 |       expect(orgId).toBeDefined()
      507 |       expect(projectId).toBeDefined()
      508 |       expect(workspaceId).toBeDefined()

      at Object.<anonymous> (e2e.js:505:28)

  ● Workspace credential test › AdobeID credentials › test subscribeCredentialToServices API (Adobe Stock)

    expect(received).toBeDefined()

    Received: undefined

      520 |
      521 |     test('test subscribeCredentialToServices API (Adobe Stock)', async () => {
    > 522 |       expect(credentialId).toBeDefined() // if not, createAdobeIdCredential test failed
          |                            ^
      523 |       expect(orgId).toBeDefined()
      524 |       expect(projectId).toBeDefined()
      525 |       expect(workspaceId).toBeDefined()

      at Object.<anonymous> (e2e.js:522:28)

  ● Workspace credential test › AdobeID credentials › test getWorkspaceForCredential API

    expect(received).toBeDefined()

    Received: undefined

      541 |
      542 |     test('test getWorkspaceForCredential API', async () => {
    > 543 |       expect(credentialId).toBeDefined() // if not, createAdobeIdCredential test failed
          |                            ^
      544 |       expect(orgId).toBeDefined()
      545 |       expect(projectId).toBeDefined()
      546 |       expect(workspaceId).toBeDefined()

      at Object.<anonymous> (e2e.js:543:28)

  ● Workspace credential test › AdobeID credentials › test getIntegration API

    expect(received).toBeDefined()

    Received: undefined

      557 |     // organization integration APIs on workspace credentials
      558 |     test('test getIntegration API', async () => {
    > 559 |       expect(credentialId).toBeDefined() // if not, createEnterpriseIntegration test failed
          |                            ^
      560 |       expect(orgId).toBeDefined()
      561 |       const res = await sdkClient.getIntegration(orgId, credentialId)
      562 |       expect(res.ok).toBe(true)

      at Object.<anonymous> (e2e.js:559:28)

  ● Workspace credential test › AdobeID credentials › test getIntegrationSecrets API

    expect(received).toBeDefined()

    Received: undefined

      569 |
      570 |     test('test getIntegrationSecrets API', async () => {
    > 571 |       expect(credentialId).toBeDefined() // if not, createEnterpriseIntegration test failed
          |                            ^
      572 |       expect(orgId).toBeDefined()
      573 |       const res = await sdkClient.getIntegrationSecrets(orgId, credentialId)
      574 |       expect(res.ok).toBe(true)

      at Object.<anonymous> (e2e.js:571:28)

  ● Workspace credential test › AdobeID credentials › test deleteCredential API (integrationType: adobeid)

    expect(received).toBeDefined()

    Received: undefined

      610 |     // delete
      611 |     test('test deleteCredential API (integrationType: adobeid)', async () => {
    > 612 |       expect(credentialId).toBeDefined() // if not, createAdobeIdCredential test failed
          |                            ^
      613 |       expect(orgId).toBeDefined()
      614 |       expect(projectId).toBeDefined()
      615 |       expect(workspaceId).toBeDefined()

      at Object.<anonymous> (e2e.js:612:28)

  ● Extension API tests › test update endpoints for workspace API

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_UPDATE_WORKSPACE_ENDPOINTS] 400 - Bad Request ([{"template":"ERR_MSG_RETRY_OR_CONTACT","message":"{\"errors\":[{\"error_code\":\"1060\",\"message\":\"Extension point 'firefly/excshell/1' does not exist\"}]}"}])

      1207 |       return res
      1208 |     } catch (err) {
    > 1209 |       throw new codes.ERROR_UPDATE_WORKSPACE_ENDPOINTS({ sdkDetails, messageValues: reduceError(err) })
           |             ^
      1210 |     }
      1211 |   }
      1212 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.updateEndPointsInWorkspace (../src/index.js:1209:13)
      at Object.<anonymous> (e2e.js:647:17)

  ● Extension API tests › test get endpoints for workspace API

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_GET_WORKSPACE_ENDPOINTS] 400 - Bad Request ([{"template":"ERR_MSG_RETRY_OR_CONTACT","message":"{\"errors\":[{\"error_code\":\"1095\",\"message\":\"Workspace 'WN1655954575512' not found\"}]}"}])

      1183 |       return res
      1184 |     } catch (err) {
    > 1185 |       throw new codes.ERROR_GET_WORKSPACE_ENDPOINTS({ sdkDetails, messageValues: reduceError(err) })
           |             ^
      1186 |     }
      1187 |   }
      1188 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.getEndPointsInWorkspace (../src/index.js:1185:13)
      at Object.<anonymous> (e2e.js:655:17)

  ● delete workspace/project › test deleteProject API (firefly project template)

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_DELETE_PROJECT] 400 - Bad Request ("Project Firefly can not be deleted")

      284 |       return res
      285 |     } catch (err) {
    > 286 |       throw new codes.ERROR_DELETE_PROJECT({ sdkDetails, messageValues: reduceError(err) })
          |             ^
      287 |     }
      288 |   }
      289 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.deleteProject (../src/index.js:286:13)
      at Object.<anonymous> (e2e.js:700:17)

  ● getSDKProperties › getSDKProperties

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_GET_SDK_PROPERTIES] 404 - Not Found ({"id":"f2af7f56-a6c5-45f3-bd8a-f32b0fe3b13d","messages":[{"template":"ERR_MSG_NOT_FOUND"}]})

      1240 |       return res
      1241 |     } catch (err) {
    > 1242 |       throw new codes.ERROR_GET_SDK_PROPERTIES({ sdkDetails, messageValues: reduceError(err) })
           |             ^
      1243 |     }
      1244 |   }
      1245 | }

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.getSDKProperties (../src/index.js:1242:13)
      at Object.<anonymous> (e2e.js:873:17)

  ● create, edit, get, delete: test trailing spaces › test trailing spaces for firefly project

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_EDIT_PROJECT] 400 - Bad Request ("Invalid value(s)")

      308 |       return res
      309 |     } catch (err) {
    > 310 |       throw new codes.ERROR_EDIT_PROJECT({ sdkDetails, messageValues: reduceError(err) })
          |             ^
      311 |     }
      312 |   }
      313 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.editProject (../src/index.js:310:13)
      at Object.<anonymous> (e2e.js:909:11)

  ● create, edit, get, delete: test trailing spaces › delete

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_DELETE_PROJECT] 400 - Bad Request ("Project Firefly can not be deleted")

      284 |       return res
      285 |     } catch (err) {
    > 286 |       throw new codes.ERROR_DELETE_PROJECT({ sdkDetails, messageValues: reduceError(err) })
          |             ^
      287 |     }
      288 |   }
      289 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.deleteProject (../src/index.js:286:13)
      at Object.<anonymous> (e2e.js:954:11)

Test Suites: 1 failed, 1 total
Tests:       13 failed, 39 passed, 52 total
Snapshots:   0 total
Time:        71.369 s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @adobe/aio-lib-console@3.2.0 e2e: `jest --config e2e/jest.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @adobe/aio-lib-console@3.2.0 e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/shazron/.npm/_logs/2022-06-23T03_24_06_805Z-debug.log
@shazron shazron added the bug Something isn't working label Jun 23, 2022
@aiojbot
Copy link
Collaborator

aiojbot commented Jun 23, 2022

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-1694

@shazron shazron mentioned this issue Aug 10, 2022
10 tasks
@shazron
Copy link
Member Author

shazron commented Aug 10, 2022

PR #40

@shazron
Copy link
Member Author

shazron commented Aug 10, 2022

Now only 2 failures, relating to Extension tests

Expand to see Test Log
 FAIL  e2e/e2e.js (64.751 s)
  init and input checks
    ✓ sdk init test
    ✓ test bad access token (783 ms)
    ✓ test bad api key (700 ms)
  organizations
    ✓ test getOrganizations API (729 ms)
    ✓ test getProjectsForOrg API (1519 ms)
  create, edit, get
    ✓ test createFireflyProject API (3634 ms)
    ✓ test createProject API (default project type) (888 ms)
    ✓ test editProject API (default project type) (853 ms)
    ✓ test editProject API for firefly project (803 ms)
    ✓ test getProject API (default type) (837 ms)
    ✓ test getProject API (firefly project type) (871 ms)
    ✓ test createWorkspace API for default project type - should fail because only one is allowed for a default project (873 ms)
    ✓ test deleteWorkspace API for default project type (to delete the default workspace) (904 ms)
    ✓ test createWorkspace API for default project type (2787 ms)
    ✓ test createWorkspace API for firefly project type (1025 ms)
    ✓ test getWorkspacesForProject API for firefly project type (855 ms)
    ✓ test getWorkspacesForProject API for default project type (802 ms)
    ✓ test editWorkspace API for default project type (846 ms)
    ✓ test editWorkspace API for firefly project type (852 ms)
    ✓ test getWorkspace API for default project type (879 ms)
    ✓ test getWorkspace API for firefly project type (841 ms)
    ✓ test getProjectForWorkspace API for default project type (852 ms)
    ✓ test getProjectForWorkspace API for firefly project type (809 ms)
  Workspace credential test
    Enterprise credentials
      ✓ test createEnterpriseCredential API (2355 ms)
      ✓ test getCredentials API (service) (803 ms)
      ✓ getSDKProperties (1516 ms)
      ✓ test subscribeCredentialToServices API (AdobeIOManagementAPISDK) (2089 ms)
      ✓ test downloadWorkspaceJson API (1964 ms)
      ✓ test getIntegration API (794 ms)
      ✓ test getIntegrationSecrets API (884 ms)
      ✓ test uploadAndBindCertificate API (1336 ms)
      ✓ test deleteCredential API (integrationType: entp) (1811 ms)
    AdobeID credentials
      ✓ test createAdobeIdCredential API (1153 ms)
      ✓ test getCredentials API (oauthweb) (793 ms)
      ✓ test subscribeCredentialToServices API (Adobe Stock) (1555 ms)
      ✓ test getWorkspaceForCredential API (806 ms)
      ✓ test getIntegration API (1145 ms)
      ✓ test getIntegrationSecrets API (860 ms)
      ✓ test deleteCredential API (integrationType: adobeid) (1935 ms)
  Extension API tests
    ✓ test get ALL ExtensionPoints API (982 ms)
    ✕ test update endpoints for workspace API (839 ms)
    ✕ test get endpoints for workspace API (854 ms)
  delete workspace/project
    ✓ test deleteWorkspace API (864 ms)
    ✓ test deleteWorkspace API for firefly project (846 ms)
    ✓ test deleteProject API (default type) (778 ms)
    ✓ test deleteProject API (firefly project template) (812 ms)
  dev terms
    ✓ get dev terms (1327 ms)
    ✓ check dev terms (821 ms)
    ✓ accept dev terms (852 ms)
  create, edit, get, delete: test trailing spaces
    ✓ test trailing spaces for firefly project (5299 ms)
    ✓ test trailing spaces for firefly workspace (2546 ms)
    ✓ delete (1583 ms)

  ● Extension API tests › test update endpoints for workspace API

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_UPDATE_WORKSPACE_ENDPOINTS] 400 - Bad Request ([{"template":"ERR_MSG_RETRY_OR_CONTACT","message":"{\"errors\":[{\"error_code\":\"1060\",\"message\":\"Extension point 'firefly/excshell/1' does not exist\"}]}"}])

      1258 |       return res
      1259 |     } catch (err) {
    > 1260 |       throw new codes.ERROR_UPDATE_WORKSPACE_ENDPOINTS({ sdkDetails, messageValues: reduceError(err) })
           |             ^
      1261 |     }
      1262 |   }
      1263 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.updateEndPointsInWorkspace (../src/index.js:1260:13)
      at Object.<anonymous> (e2e.js:658:17)

  ● Extension API tests › test get endpoints for workspace API

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_GET_WORKSPACE_ENDPOINTS] 400 - Bad Request ([{"template":"ERR_MSG_RETRY_OR_CONTACT","message":"{\"errors\":[{\"error_code\":\"1095\",\"message\":\"Workspace 'WN1660121382302' not found\"}]}"}])

      1234 |       return res
      1235 |     } catch (err) {
    > 1236 |       throw new codes.ERROR_GET_WORKSPACE_ENDPOINTS({ sdkDetails, messageValues: reduceError(err) })
           |             ^
      1237 |     }
      1238 |   }
      1239 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.getEndPointsInWorkspace (../src/index.js:1236:13)
      at Object.<anonymous> (e2e.js:666:17)

Test Suites: 1 failed, 1 total
Tests:       2 failed, 50 passed, 52 total
Snapshots:   0 total
Time:        64.788 s, estimated 69 s
Ran all test suites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants