diff --git a/test/bats/contract/deploy.bats b/test/bats/contract/deploy.bats index 1abf159f3..98cef6a2a 100644 --- a/test/bats/contract/deploy.bats +++ b/test/bats/contract/deploy.bats @@ -31,16 +31,15 @@ deploy_assertion() { "${CONNECT_SERVER}/__api__/v1/content/${GUID}" assert_output --partial "\"app_mode\":\"${APP_MODE}\"" assert_output --partial "\"description\":\"${CONTENT} description\"" - # if [[ ${static_content[@]} != ${CONTENT_TYPE} ]]; then - assert_output --partial "\"connection_timeout\":25" - assert_output --partial "\"read_timeout\":30" - assert_output --partial "\"init_timeout\":35" - assert_output --partial "\"idle_timeout\":40" - assert_output --partial "\"max_processes\":2" - assert_output --partial "\"min_processes\":1" - assert_output --partial "\"max_conns_per_process\":5" - assert_output --partial "\"load_factor\":0.8" - # fi + assert_output --partial "\"connection_timeout\":25" + assert_output --partial "\"read_timeout\":30" + assert_output --partial "\"init_timeout\":35" + assert_output --partial "\"idle_timeout\":40" + assert_output --partial "\"max_processes\":2" + assert_output --partial "\"min_processes\":1" + assert_output --partial "\"max_conns_per_process\":5" + assert_output --partial "\"load_factor\":0.8" + # reset min_processes to 0 run curl --silent --show-error -L --max-redirs 0 --fail \ @@ -59,6 +58,10 @@ init_with_fields() { # add description perl -i -pe '$_ .= qq(description = "'"${CONTENT}"' description"\n) if /title/' ${FULL_PATH}/.posit/publish/${CONTENT}.toml + if [[ ${ADDITIONAL_FILES} ]]; then + perl -i -pe "s/(files = \[.*)\]/\1, '${ADDITIONAL_FILES}']/" ${FULL_PATH}/.posit/publish/${CONTENT}.toml + fi + # add Connect runtime fields for interactive content echo " [connect] @@ -72,8 +75,6 @@ runtime.max_conns_per_process = 5 runtime.load_factor = 0.8 " >> ${FULL_PATH}/.posit/publish/${CONTENT}.toml -# TODO: replace the type field with what we expect -# sed -i "" "s/type = '[^']*'/type = '${CONTENT_TYPE}'/g" "${FULL_PATH}/.posit/publish/${CONTENT}.toml" sed -i"" -e "s/type = '[^']*'/type = '${CONTENT_TYPE}'/g" "${FULL_PATH}/.posit/publish/${CONTENT}.toml" } @@ -95,16 +96,15 @@ python_content_types=( assert_line "Wrote file requirements.txt:" # compare show output to expected existing requirements.in file - run ${EXE} requirements show ${FULL_PATH}/ + run ${EXE} requirements show ${FULL_PATH}/ assert_success - run diff <(grep -o '^[^=]*' ${FULL_PATH}/test/requirements.in | grep -v '^#') <(grep -o '^[^=]*' ${FULL_PATH}/requirements.txt | grep -v '^#') + run diff -i <(grep -o '^[^=]*' ${FULL_PATH}/test/requirements.in | grep -v '^#') <(grep -o '^[^=]*' ${FULL_PATH}/requirements.txt | grep -v '^#') assert_success else skip fi } - # deploy content with the env account using requirements files @test "deploy ${CONTENT}" { if [[ ${CONTENT} != "parameterized_report" ]]; then