Skip to content

Commit ab51247

Browse files
authored
Merge pull request dokku#6465 from dokku/fix-haproxy-tests
Update haproxy tests so they pass
2 parents d656d18 + 464019f commit ab51247

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

tests/unit/haproxy.bats

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,25 @@ teardown() {
8888
echo "status: $status"
8989
assert_success
9090

91-
run /bin/bash -c "curl --silent $TEST_APP.${DOKKU_DOMAIN}"
91+
sleep 5
92+
93+
run /bin/bash -c "dokku logs $TEST_APP"
9294
echo "output: $output"
9395
echo "status: $status"
9496
assert_success
95-
assert_output "python/http.server"
9697

97-
run /bin/bash -c "curl --silent $TEST_APP-2.${DOKKU_DOMAIN}"
98+
run /bin/bash -c "dokku ps:inspect $TEST_APP"
9899
echo "output: $output"
99100
echo "status: $status"
100101
assert_success
101-
assert_output "python/http.server"
102+
103+
run /bin/bash -c "docker logs haproxy-haproxy-1"
104+
echo "output: $output"
105+
echo "status: $status"
106+
assert_success
107+
108+
assert_http_localhost_response "http" "$TEST_APP.$DOKKU_DOMAIN" "80" "/" "python/http.server"
109+
assert_http_localhost_response "http" "$TEST_APP-2.$DOKKU_DOMAIN" "80" "/" "python/http.server"
102110
}
103111

104112
@test "(haproxy) ssl" {

0 commit comments

Comments
 (0)