feat: shared site testing script and move to linkinator#97
Conversation
User Test ResultsTest specification and instructions User tests are not required |
741832a to
c855186
Compare
Relates-to: keymanapp/keyman.com#788 Test-bot: skip
c855186 to
df4837e
Compare
| local CONTAINER_PORT="$2" | ||
| local TEST_PATH="$3" | ||
| shift 3 | ||
| local SKIP_PATHS=("$*") |
There was a problem hiding this comment.
| local SKIP_PATHS=("$*") | |
| local SKIP_PATHS=("$@") |
| shift 2 | ||
| local skipPaths skip skipParams=() | ||
| if [[ $# -gt 1 ]]; then | ||
| skipPaths=("$*") |
There was a problem hiding this comment.
| skipPaths=("$*") | |
| skipPaths=("$@") |
| local LINK_RESULT | ||
| echo "TIER_TEST" > tier.txt | ||
|
|
||
| # from commands.inc.sh |
There was a problem hiding this comment.
Which commands.inc.sh ?
| @@ -0,0 +1,93 @@ | |||
| # shellcheck shell=bash | |||
There was a problem hiding this comment.
| # shellcheck shell=bash | |
| # shellcheck shell=bash | |
| # Keyman is copyright (C) SIL Global. MIT License. |
| @@ -1,5 +1,7 @@ | |||
| # Common docker functions. | |||
There was a problem hiding this comment.
| # Common docker functions. | |
| # shellcheck shell=bash | |
| # Keyman is copyright (C) SIL Global. MIT License. | |
| # | |
| # Common docker functions. |
| # | ||
| function do_test_unit_tests() { | ||
| local CONTAINER="$1" | ||
| docker exec "${CONTAINER}" sh -c "vendor/bin/phpunit --testdox ${builder_extra_params[*]}" |
There was a problem hiding this comment.
| docker exec "${CONTAINER}" sh -c "vendor/bin/phpunit --testdox ${builder_extra_params[*]}" | |
| docker exec "${CONTAINER}" sh -c "vendor/bin/phpunit --testdox ${builder_extra_params[@]}" |
| shift 3 | ||
| local SKIP_PATHS=("$*") | ||
|
|
||
| local LINK_RESULT |
There was a problem hiding this comment.
This needs to be initialized, otherwise we return uninitialized value if we don't do link checks.
| local LINK_RESULT | |
| local LINK_RESULT=0 |
| local testPath="$2" | ||
| shift 2 | ||
| local skipPaths skip skipParams=() | ||
| if [[ $# -gt 1 ]]; then |
There was a problem hiding this comment.
| if [[ $# -gt 1 ]]; then | |
| if [[ $# -ge 1 ]]; then |
| # | ||
| function do_test_print_container_error_logs() { | ||
| local CONTAINER="$1" | ||
| if docker container logs "${CONTAINER}" --since "${TEST_START_TIME}" 2>&1 | grep -q 'php7'; then |
There was a problem hiding this comment.
Can we add some check somewhere that we're still running the expected PHP version that outputs php7?
Makes me a bit nervous that PHP gets upgraded and we forget to upgrade this string which then causes silent failure (or rather non-failure) of this function.
| local SKIP_PATHS=("$*") | ||
|
|
||
| local LINK_RESULT | ||
| echo "TIER_TEST" > tier.txt |
There was a problem hiding this comment.
What's the purpose of tier.txt ?
Relates-to: keymanapp/keyman.com#788
Test-bot: skip