Skip to content

feat: shared site testing script and move to linkinator#97

Open
mcdurdin wants to merge 1 commit into
mainfrom
feat/linkinator-and-central-test-script
Open

feat: shared site testing script and move to linkinator#97
mcdurdin wants to merge 1 commit into
mainfrom
feat/linkinator-and-central-test-script

Conversation

@mcdurdin

Copy link
Copy Markdown
Member

Relates-to: keymanapp/keyman.com#788
Test-bot: skip

@mcdurdin mcdurdin requested a review from ermshiperete June 15, 2026 08:40
@keymanapp-test-bot

Copy link
Copy Markdown

User Test Results

Test specification and instructions

User tests are not required

@github-actions github-actions Bot added the feat label Jun 15, 2026
@keymanapp-test-bot keymanapp-test-bot Bot added this to the A19S31 milestone Jun 15, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Keyman Jun 15, 2026
@mcdurdin mcdurdin force-pushed the feat/linkinator-and-central-test-script branch from 741832a to c855186 Compare June 15, 2026 08:54
@mcdurdin mcdurdin force-pushed the feat/linkinator-and-central-test-script branch from c855186 to df4837e Compare June 15, 2026 08:59
Comment thread _common/docker.inc.sh
local CONTAINER_PORT="$2"
local TEST_PATH="$3"
shift 3
local SKIP_PATHS=("$*")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
local SKIP_PATHS=("$*")
local SKIP_PATHS=("$@")

Comment thread _common/tests.inc.sh
shift 2
local skipPaths skip skipParams=()
if [[ $# -gt 1 ]]; then
skipPaths=("$*")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
skipPaths=("$*")
skipPaths=("$@")

Comment thread _common/docker.inc.sh
local LINK_RESULT
echo "TIER_TEST" > tier.txt

# from commands.inc.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which commands.inc.sh ?

Comment thread _common/tests.inc.sh
@@ -0,0 +1,93 @@
# shellcheck shell=bash

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# shellcheck shell=bash
# shellcheck shell=bash
# Keyman is copyright (C) SIL Global. MIT License.

Comment thread _common/docker.inc.sh
@@ -1,5 +1,7 @@
# Common docker functions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Common docker functions.
# shellcheck shell=bash
# Keyman is copyright (C) SIL Global. MIT License.
#
# Common docker functions.

Comment thread _common/tests.inc.sh
#
function do_test_unit_tests() {
local CONTAINER="$1"
docker exec "${CONTAINER}" sh -c "vendor/bin/phpunit --testdox ${builder_extra_params[*]}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
docker exec "${CONTAINER}" sh -c "vendor/bin/phpunit --testdox ${builder_extra_params[*]}"
docker exec "${CONTAINER}" sh -c "vendor/bin/phpunit --testdox ${builder_extra_params[@]}"

Comment thread _common/docker.inc.sh
shift 3
local SKIP_PATHS=("$*")

local LINK_RESULT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be initialized, otherwise we return uninitialized value if we don't do link checks.

Suggested change
local LINK_RESULT
local LINK_RESULT=0

Comment thread _common/tests.inc.sh
local testPath="$2"
shift 2
local skipPaths skip skipParams=()
if [[ $# -gt 1 ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [[ $# -gt 1 ]]; then
if [[ $# -ge 1 ]]; then

Comment thread _common/tests.inc.sh
#
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread _common/docker.inc.sh
local SKIP_PATHS=("$*")

local LINK_RESULT
echo "TIER_TEST" > tier.txt

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of tier.txt ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants