mirror of
https://github.com/jcwimer/docker-swarm-autoscaler
synced 2026-03-24 15:04:42 +00:00
docker-swarm-autoscaler unit tests
Dependencies (packaged into docker with ./run-tests.sh)
uses rspec-shell-expectations
- Ruby 2.6.3
- jq needs installed
Gotchas
- Do not use ${0} in scripts. Instead use ${BASH_SOURCE[0]}
- Many times it is necessary to see the stdout and stderr in your test to see what you forgot to mock. For example, if your test is failing
you can do
expect(stdout).to eq ''and rspec will fail and give you the stdout message. Same with stderr. This will help you mock the things you might have overlooked.