adobe/aio-e2e-tests

e2e test for Analytics - getUsageLogs is failing

Closed this issue · 4 comments

This is a problem with our e2e instance, it doesn't occur with other instances. The e2e test has been commented out with a reason in the comments for now.

Log:

FAIL e2e/e2e.js (17.198s)
  ✓ sdk init test (41ms)
  ✓ test getCollections and getCollectionById (2152ms)
  ✕ test getUsageLogs (877ms)
  ✓ test getMetrics and getMetricById (1233ms)
  ✓ test getCalculatedMetrics and getCalculatedMetricById (973ms)
  ✓ test getDateRanges and getDateRangeById (788ms)
  ✓ test getDimensions and getDimensionById (8168ms)
  ✓ test getSegments and validateSegment (461ms)
  ✓ test getUsers and getCurrentUser (1414ms)

  ● test getUsageLogs

    AnalyticsSDKError: [AnalyticsSDK:ERROR_GET_USAGE_LOGS] Error: Internal Server Error

      466 |         })
      467 |         .catch(err => {
    > 468 |           reject(new codes.ERROR_GET_USAGE_LOGS({ sdkDetails, messageValues: err }))
          |                  ^
      469 |         })
      470 |     })
      471 |   }

      at http (node_modules/swagger-client/lib/http.js:106:19)
      at processTicksAndRejections (internal/process/task_queues.js:97:5) {
        status: 500,
        statusCode: 500,
        response: [Object]
      }
      at new <anonymous> (node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at src/index.js:468:18

Test Suites: 1 failed, 1 total
Tests:       1 failed, 8 passed, 9 total
Snapshots:   0 total
Time:        17.734s

Analytics API throws 500 error on our test instance. Commenting out the test for logs api - adobe/aio-lib-analytics#56

We should do a conditional test, based on perhaps an environment variable that is descriptive (until we can get to the bottom of it). Perhaps ANALYTICS_SKIP_GET_USAGE_LOGS, and use this code:
jestjs/jest#7245 (comment)

@sandeep-paliwal I believe the test server has been fixed so this issue can be closed? can you confirm

yeah, it was permission related issue and test server has been updated to fix this. We can close this.