Skip to content

Commit

Permalink
adding missing library
Browse files Browse the repository at this point in the history
  • Loading branch information
Costas Papastathis committed Sep 25, 2024
1 parent 7578c8a commit 333072f
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions test/test-lib-nodejs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,47 @@ test_incremental_build() {

}

test_node_cmd() {
local app=$1
local node_env=$2
local init_wrapper=$3
local node_cmd=$4

run_test_application_with_quoted_args $app "-e NODE_ENV=$node_env -e INIT_WRAPPER=$init_wrapper -e NODE_CMD=$node_cmd"
logs=$(container_logs)
wait_for_cid

test_connection
ct_check_testcase_result $?

logs=$(container_logs)
echo ${logs} | grep -q DEBUG_PORT=5858
ct_check_testcase_result $?
echo ${logs} | grep -q NODE_ENV=$node_env
ct_check_testcase_result $?
echo ${logs} | grep -q INIT_WRAPPER=$init_wrapper
ct_check_testcase_result $?
echo ${logs} | grep -q NODE_CMD="$node_cmd"
ct_check_testcase_result $?

kill_test_application
}

function test_scl_variables_in_dockerfile() {
if [ "$OS" == "rhel7" ] || [ "$OS" == "centos7" ]; then
echo "Testing npm availability in Dockerfile"
ct_binary_found_from_df npm
ct_check_testcase_result $?

info "Testing variable presence during \`docker exec\`"
ct_check_exec_env_vars
ct_check_testcase_result $?

info "Checking if all scl variables are defined in Dockerfile"
ct_check_scl_enable_vars
ct_check_testcase_result $?
fi
}

# test express webapp
run_s2i_build_express_webapp() {
Expand Down

0 comments on commit 333072f

Please sign in to comment.