First identify your image.
$ docker ps --format "{{.ID}}: {{.Image}} {{.Names}}"
3d2fb2ab2ca5: jenkins-docker jenkins-docker_1
Then login into the image as root.
$ docker container exec -u 0 -it jenkins-docker_1 /bin/bash
// Environment Variables: | |
// url: <your-resource> example: https://myfancyapp.crm4.dynamics.com | |
// clientid: <user-clientid-from-appreg> example: 1950a258-227b-4e31-a9cf-717495945fc2 | |
// To know how to use this script, please read the following blog post: | |
// https://bycode.dev/2024/04/04/automatically-authenticate-in-postman-with-pre-request-scripts/ | |
const utils = { | |
auth: { | |
message: "", | |
async refreshAuth() { |
cy.visit('/404') | |
//=> Test fails | |
cy.visit('/404', {failOnStatusCode: false}) | |
//=> Test passes but does not test the HTTP code was 404 | |
cy.request({url: '/404', failOnStatusCode: false}).its('status').should('equal', 404) | |
cy.visit('/404', {failOnStatusCode: false}) | |
//=> Test passes, tests that the HTTP code was 404, and tests page was visited |
First identify your image.
$ docker ps --format "{{.ID}}: {{.Image}} {{.Names}}"
3d2fb2ab2ca5: jenkins-docker jenkins-docker_1
Then login into the image as root.
$ docker container exec -u 0 -it jenkins-docker_1 /bin/bash
# Consider the following setup: | |
# | |
# root | |
# + a | |
# | + Makefile | |
# | + ..some other files.. | |
# + b | |
# + Makefile | |
# + ..some other files.. | |
# |