2020-06-20 13:22:47 -04:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
|
|
load test_helper
|
|
|
|
|
|
|
|
|
|
setup() {
|
|
|
|
|
global_setup
|
|
|
|
|
create_app
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
teardown() {
|
|
|
|
|
destroy_app
|
|
|
|
|
global_teardown
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "(init) buildpack" {
|
|
|
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
|
|
|
local APP="zombies-buildpack"
|
2023-07-31 13:08:16 -04:00
|
|
|
run deploy_app "$APP"
|
|
|
|
|
echo "output: $output"
|
|
|
|
|
echo "status: $status"
|
|
|
|
|
assert_success
|
|
|
|
|
|
2020-06-20 13:22:47 -04:00
|
|
|
local CIDS=$(get_app_container_ids "$APP")
|
|
|
|
|
|
|
|
|
|
run "$DOCKER_BIN" container top "$CIDS"
|
|
|
|
|
echo "output: $output"
|
|
|
|
|
assert_output_contains "<defunct>" "0"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "(init) dockerfile no tini" {
|
|
|
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
|
|
|
local APP="zombies-dockerfile-no-tini"
|
2023-07-31 13:08:16 -04:00
|
|
|
run deploy_app "$APP"
|
|
|
|
|
echo "output: $output"
|
|
|
|
|
echo "status: $status"
|
|
|
|
|
assert_success
|
|
|
|
|
|
2020-06-20 13:22:47 -04:00
|
|
|
local CIDS=$(get_app_container_ids "$APP")
|
2021-01-20 14:49:38 -05:00
|
|
|
|
2020-06-20 13:22:47 -04:00
|
|
|
run "$DOCKER_BIN" container top "$CIDS"
|
|
|
|
|
echo "output: $output"
|
|
|
|
|
assert_output_contains "<defunct>" "0"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "(init) dockerfile with tini" {
|
|
|
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
|
|
|
local APP="zombies-dockerfile-tini"
|
2023-07-31 13:08:16 -04:00
|
|
|
run deploy_app "$APP"
|
|
|
|
|
echo "output: $output"
|
|
|
|
|
echo "status: $status"
|
|
|
|
|
assert_success
|
|
|
|
|
|
2020-06-20 13:22:47 -04:00
|
|
|
local CIDS=$(get_app_container_ids "$APP")
|
|
|
|
|
|
|
|
|
|
run "$DOCKER_BIN" container top "$CIDS"
|
|
|
|
|
echo "output: $output"
|
|
|
|
|
assert_output_contains "<defunct>" "0"
|
|
|
|
|
}
|