SEC-10095 test(cypress): demote unstable tests (#36099)
* test(cypress): demote unstable tests * follow fixes * fix merging playwright reports
Этот коммит содержится в:
@@ -58,7 +58,7 @@ mme2e_wait_image () {
|
||||
IMAGE_NAME=${1?}
|
||||
RETRIES_LEFT=${2:-1}
|
||||
RETRIES_INTERVAL=${3:-10}
|
||||
mme2e_wait_command_success "docker pull $IMAGE_NAME" "Waiting for docker image ${IMAGE_NAME} to be available" "$RETRIES_LEFT" "$RETRIES_INTERVAL"
|
||||
mme2e_wait_command_success "docker pull --platform linux/amd64 $IMAGE_NAME" "Waiting for docker image ${IMAGE_NAME} to be available" "$RETRIES_LEFT" "$RETRIES_INTERVAL"
|
||||
}
|
||||
mme2e_is_token_in_list() {
|
||||
local TOKEN=$1
|
||||
|
||||
@@ -14,13 +14,16 @@ cd "$(dirname "$0")"
|
||||
: ${WEBHOOK_URL:-} # Optional. Mattermost webhook to post the report back to
|
||||
: ${RELEASE_DATE:-} # Optional. If set, its value will be included in the report as the release date of the tested artifact
|
||||
if [ "$TYPE" = "PR" ]; then
|
||||
# In this case, we expect the PR number to be present in the BRANCH variable
|
||||
BRANCH_REGEX='^server-pr-[0-9]+$'
|
||||
if ! grep -qE "${BRANCH_REGEX}" <<<"$BRANCH"; then
|
||||
mme2e_log "Error: when using TYPE=PR, the BRANCH variable should respect regex '$BRANCH_REGEX'. Aborting." >&2
|
||||
exit 1
|
||||
# Try to determine PR number: first from PR_NUMBER, then from BRANCH (server-pr-XXXX format)
|
||||
if [ -n "${PR_NUMBER:-}" ]; then
|
||||
export PULL_REQUEST="https://github.com/mattermost/mattermost/pull/${PR_NUMBER}"
|
||||
elif grep -qE '^server-pr-[0-9]+$' <<<"${BRANCH:-}"; then
|
||||
PR_NUMBER="${BRANCH##*-}"
|
||||
export PULL_REQUEST="https://github.com/mattermost/mattermost/pull/${PR_NUMBER}"
|
||||
else
|
||||
mme2e_log "Warning: TYPE=PR but cannot determine PR number from PR_NUMBER or BRANCH. Falling back to TYPE=NONE."
|
||||
TYPE=NONE
|
||||
fi
|
||||
export PULL_REQUEST="https://github.com/mattermost/mattermost/pull/${BRANCH##*-}"
|
||||
fi
|
||||
|
||||
# Env vars used during the test. Their values will be included in the report
|
||||
|
||||
@@ -48,6 +48,7 @@ generate_docker_compose_file() {
|
||||
services:
|
||||
server:
|
||||
image: \${SERVER_IMAGE}
|
||||
platform: linux/amd64
|
||||
restart: always
|
||||
env_file:
|
||||
- "./.env.server"
|
||||
@@ -81,7 +82,7 @@ $(for service in $ENABLED_DOCKER_SERVICES; do
|
||||
$(if mme2e_is_token_in_list "postgres" "$ENABLED_DOCKER_SERVICES"; then
|
||||
echo '
|
||||
postgres:
|
||||
image: mattermostdevelopment/mirrored-postgres:13
|
||||
image: mattermostdevelopment/mirrored-postgres:14
|
||||
restart: "no"
|
||||
network_mode: host
|
||||
networks: !reset []
|
||||
|
||||
@@ -37,7 +37,7 @@ EOF
|
||||
|
||||
# Run Playwright test
|
||||
# NB: do not exit the script if some testcases fail
|
||||
${MME2E_DC_SERVER} exec -i -u "$MME2E_UID" -- playwright bash -c "cd e2e-tests/playwright && npm run test:ci -- ${TEST_FILTER}" | tee ../playwright/logs/playwright.log || true
|
||||
${MME2E_DC_SERVER} exec -i -u "$MME2E_UID" -- playwright bash -c "cd e2e-tests/playwright && npm run test:ci -- ${TEST_FILTER} ${PW_SHARD:-}" | tee ../playwright/logs/playwright.log || true
|
||||
|
||||
# Collect run results
|
||||
# Documentation on the results.json file: https://playwright.dev/docs/api/class-testcase#test-case-expected-status
|
||||
|
||||
Ссылка в новой задаче
Block a user