Skip to content

Instantly share code, notes, and snippets.

View rafaelaazevedo's full-sized avatar

Rafaela Azevedo rafaelaazevedo

View GitHub Profile
FROM postman/newman
WORKDIR /etc/newman/
COPY . /etc/newman/
RUN chmod -R 700 /etc/newman && npm install newman-reporter-html -g
@rafaelaazevedo
rafaelaazevedo / docker-clean.sh
Last active August 23, 2023 13:51
Clean all docker images/containers/volumes script
#!/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.
// Bad practice
const EXPECTED_BODY = {
name: fake.name,
surname: fake.surname,
createdDate: Date.now(),
country: fake.country()
}
// Good practice
const EXPECTED_BODY = {
$ pact-broker can-i-deploy --pacticipant Cat --version 21 --pacticipant Dog --version 32
describe('Pact Verification', () => {
if('should validate the contract', () =>
let opts = {
customProviderHeaders: ["Authorization: Bearer tu834r93h8rygr38y4r"]
};
return provider.verify(opts)
})
})
body: {
name: "Mary",
dateOfBirthday: Matchers.term(
generate: "02/11/2013",
matcher:/\d{2}\/\d{2}\/\d{4}/)
}
body: {
name: "Mary",
age: Matchers.like(73)
}
query: {
name: 'Mary Jame',
age: '8',
children: ['Betty', 'Sue']
}
willRespondWith: {
status: 200,
body: Matchers.somethingLike(name: "Mary", age: 20)
}
const credentials = { username: "test", password: "123"}