This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM postman/newman | |
| WORKDIR /etc/newman/ | |
| COPY . /etc/newman/ | |
| RUN chmod -R 700 /etc/newman && npm install newman-reporter-html -g |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Kill all running containers. | |
| docker kill $(docker ps -q) | |
| # Delete all stopped containers. | |
| printf "\n>>> Deleting stopped containers\n\n" && docker rm $(docker ps -a -q) | |
| # Delete all untagged images. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Bad practice | |
| const EXPECTED_BODY = { | |
| name: fake.name, | |
| surname: fake.surname, | |
| createdDate: Date.now(), | |
| country: fake.country() | |
| } | |
| // Good practice | |
| const EXPECTED_BODY = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ pact-broker can-i-deploy --pacticipant Cat --version 21 --pacticipant Dog --version 32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe('Pact Verification', () => { | |
| if('should validate the contract', () => | |
| let opts = { | |
| customProviderHeaders: ["Authorization: Bearer tu834r93h8rygr38y4r"] | |
| }; | |
| return provider.verify(opts) | |
| }) | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body: { | |
| name: "Mary", | |
| dateOfBirthday: Matchers.term( | |
| generate: "02/11/2013", | |
| matcher:/\d{2}\/\d{2}\/\d{4}/) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body: { | |
| name: "Mary", | |
| age: Matchers.like(73) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| query: { | |
| name: 'Mary Jame', | |
| age: '8', | |
| children: ['Betty', 'Sue'] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| willRespondWith: { | |
| status: 200, | |
| body: Matchers.somethingLike(name: "Mary", age: 20) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const credentials = { username: "test", password: "123"} |
OlderNewer