Fix expose tests
This commit is contained in:
@@ -328,7 +328,7 @@ service_port_unpause() {
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker run -d --link "$SERVICE_NAME:$PLUGIN_COMMAND_PREFIX" --name "$EXPOSED_NAME" $(docker_ports_options "${PORTS[@]}") --restart always --label dokku=ambassador --label "dokku.ambassador=$PLUGIN_COMMAND_PREFIX" svendowideit/ambassador > /dev/null
|
docker run -d --link "$SERVICE_NAME:$PLUGIN_COMMAND_PREFIX" --name "$EXPOSED_NAME" $(docker_ports_options "${PORTS[@]}") --restart always --label dokku=ambassador --label "dokku.ambassador=$PLUGIN_COMMAND_PREFIX" svendowideit/ambassador > /dev/null
|
||||||
if [[ "$LOG_FAIL" == "true" ]]; then
|
if [[ "$LOG_FAIL" == "true" ]]; then
|
||||||
dokku_log_info1 "Service $SERVICE exposed on port(s) [container~>host]: $(service_exposed_ports "$SERVICE")"
|
dokku_log_info1 "Service $SERVICE exposed on port(s) [container->host]: $(service_exposed_ports "$SERVICE")"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ teardown() {
|
|||||||
|
|
||||||
@test "($PLUGIN_COMMAND_PREFIX:expose) success when not providing custom ports" {
|
@test "($PLUGIN_COMMAND_PREFIX:expose) success when not providing custom ports" {
|
||||||
run dokku "$PLUGIN_COMMAND_PREFIX:expose" l
|
run dokku "$PLUGIN_COMMAND_PREFIX:expose" l
|
||||||
[[ "${lines[*]}" =~ exposed\ on\ port\(s\)\ [[:digit:]]+ ]]
|
[[ "${lines[*]}" =~ exposed\ on\ port\(s\)\ \[container\-\>host\]\:\ [[:digit:]]+ ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "($PLUGIN_COMMAND_PREFIX:expose) success when providing custom ports" {
|
@test "($PLUGIN_COMMAND_PREFIX:expose) success when providing custom ports" {
|
||||||
run dokku "$PLUGIN_COMMAND_PREFIX:expose" l 4242 4243 4244 4245
|
run dokku "$PLUGIN_COMMAND_PREFIX:expose" l 4242 4243 4244 4245
|
||||||
assert_contains "${lines[*]}" "exposed on port(s) [container~>host]: 27017~>4242 27018~>4243 27019~>4244 28017~>4245"
|
assert_contains "${lines[*]}" "exposed on port(s) [container->host]: 27017->4242 27018->4243 27019->4244 28017->4245"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user