Correct generated files

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
This commit is contained in:
phracek 2021-02-16 14:42:16 +00:00
commit 9c6def25bf
16 changed files with 757 additions and 319 deletions

View file

@ -187,6 +187,12 @@ test_application() {
cleanup_app
}
test_from_dockerfile(){
info "Test from Dockerfile"
sed "s@#IMAGE_NAME#@${IMAGE_NAME}@" $test_dir/from-dockerfile/Dockerfile.tpl > $test_dir/from-dockerfile/Dockerfile
ct_test_app_dockerfile $test_dir/from-dockerfile/Dockerfile 'https://github.com/sclorg/django-ex.git' 'Welcome to your Django application on OpenShift' app-src
check_result $?
}
# Since we built the candidate image locally, we don't want S2I attempt to pull
# it from Docker hub
@ -228,4 +234,20 @@ for app in ${@:-${WEB_APPS[@]}}; do
cleanup ${app}
done
if [ "$OS" == "rhel7" ] || [ "$OS" == "centos7" ]; then
# autocleanup only enabled here as only the following tests so far use it
CID_FILE_DIR=$(mktemp -d)
ct_enable_cleanup
info "Testing variable presence during \`docker exec\`"
ct_check_exec_env_vars
check_result $?
info "Checking if all scl variables are defined in Dockerfile"
ct_check_scl_enable_vars
check_result $?
fi
test_from_dockerfile
info "All tests finished successfully."