Cypress test case fails in the docker environment, where it runs seamlessly outside the docker works #26205
Unanswered
emoraperez
asked this question in
Docker
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We're working with cypress and docker in one automation for retrieving some API requests POST,on my local when I run the scenario working fine but we have some problems with this running with Jenkins pipeline and docker:
Validate Refresh Token: CypressError:
cy.request()` failed trying to load:https://alation.somecompany.int/integration/v1/validateRefreshToken/
We attempted to make an http request to this URL but the request failed without a response.
We received this error at the network level:
The request we sent was:
Method: POST
URL: https://alation.somecompany.int/integration/v1/validateRefreshToken/
Common situations why this would fail:
https://on.cypress.io/request
at (https://www.somecompany.com/__cypress/runner/cypress_runner.js:139757:78)
at tryCatcher (https://www.somecompany.com/__cypress/runner/cypress_runner.js:8914:23)
at (https://www.somecompany.com/__cypress/runner/cypress_runner.js:4053:37)
at tryCatcher (https://www.somecompany.com/__cypress/runner/cypress_runner.js:8914:23)
at Promise._settlePromiseFromHandler (https://www.somecompany.com/__cypress/runner/cypress_runner.js:6849:31)
at Promise._settlePromise (https://www.somecompany.com/__cypress/runner/cypress_runner.js:6906:18)
at Promise._settlePromise0 (https://www.somecompany.com/__cypress/runner/cypress_runner.js:6951:10)
at Promise._settlePromises (https://www.somecompany.com/__cypress/runner/cypress_runner.js:7027:18)
at _drainQueueStep (https://www.somecompany.com/__cypress/runner/cypress_runner.js:3621:12)
at _drainQueue (https://www.somecompany.com/__cypress/runner/cypress_runner.js:3614:9)
at ../../node_modules/bluebird/js/release/async.js.Async._drainQueues (https://www.somecompany.com/__cypress/runner/cypress_runner.js:3630:5)
at Async.drainQueues (https://www.somecompany.com/__cypress/runner/cypress_runner.js:3500:14)
From Your Spec Code:
at Context.eval (webpack:///./cypress/e2e/edqe2e_alation.js:15:51)
From Node.js Internals:
RequestError: Error: getaddrinfo ENOTFOUND alation.somecompany.int
at new r (:1737:499180)
at ee.callback (:1737:505181)
at e.callback.s.callback [as _callback] (:1737:504627)
at s._callback.s.callback.s.callback (:1955:65115)
at ee.emit (node:events:527:28)
at ee.onRequestError (:1955:74057)
at ClientRequest.emit (node:events:539:35)
at TLSSocket.socketErrorListener (node:_http_client:454:9)
at TLSSocket.emit (node:events:527:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)``
I'm running through docker with this command on jenkins pipeline:
"docker run -it -v ${WORKSPACE}:/e2e -w /e2e cypress/included:12.8.1 --config-file ./cypress.config.js --headed --browser chrome --spec './cypress/e2e/test.js'"
Beta Was this translation helpful? Give feedback.
All reactions