Compare commits
1 Commits
v2.0.0
...
fix-per-ro
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb2a9b5f72 |
@@ -46,6 +46,14 @@ class CommandsHealthcheckTest < ActiveSupport::TestCase
|
|||||||
new_command.run.join(" ")
|
new_command.run.join(" ")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "run with custom per-role healthcheck options" do
|
||||||
|
@config[:servers] = { "web" => { "hosts" => [ "1.1.1.1" ],
|
||||||
|
"healthcheck" => { "log_lines" => 150 } } }
|
||||||
|
assert_equal \
|
||||||
|
"docker container ls --all --filter name=^healthcheck-app-123$ --quiet | xargs docker logs --tail 150 2>&1",
|
||||||
|
new_command.logs.join(" ")
|
||||||
|
end
|
||||||
|
|
||||||
test "status" do
|
test "status" do
|
||||||
assert_equal \
|
assert_equal \
|
||||||
"docker container ls --all --filter name=^healthcheck-app-123$ --quiet | xargs docker inspect --format '{{if .State.Health}}{{.State.Health.Status}}{{else}}{{.State.Status}}{{end}}'",
|
"docker container ls --all --filter name=^healthcheck-app-123$ --quiet | xargs docker inspect --format '{{if .State.Health}}{{.State.Health.Status}}{{else}}{{.State.Status}}{{end}}'",
|
||||||
|
|||||||
Reference in New Issue
Block a user