E2E Tests: unify compose files, support Opensearch (#28716)
* Unify docker-compose files, support opensearch and redis * Support cypress/playwright bools, MM_SERVICE_OVERRIDES input * Remove unused directives from E2E tests * [skip ci] Fix ES tests, PR messages * [skip ci] Fix service pruning on server restart * [skip ci] Make services overrides a CSV, better param descriptions --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6af8c2f83e
Коммит
0a14eb3d45
60
.github/workflows/e2e-fulltests-ci.yml
поставляемый
60
.github/workflows/e2e-fulltests-ci.yml
поставляемый
@@ -11,15 +11,20 @@ on:
|
||||
required: false
|
||||
PR_NUMBER:
|
||||
type: string
|
||||
description: If testing a PR, this must be specified as well.
|
||||
description: The PR number that the ref to test belongs to. Required, If testing a PR.
|
||||
required: false
|
||||
ROLLING_RELEASE_FROM_TAG:
|
||||
type: string
|
||||
description: If specified, the server will be initialized with the given release tag, perform a rolling upgrade, then run the full E2E test.
|
||||
description: Mattermost release git tag to perform a RollingRelease from, before upgrading to the tested ref and perform the full E2E test. Optional.
|
||||
required: false
|
||||
MM_ENV:
|
||||
type: string
|
||||
required: false
|
||||
description: A comma-separated list of environment variables to set for the server. Spaces are not supported.
|
||||
MM_SERVICE_OVERRIDES:
|
||||
type: string
|
||||
required: false
|
||||
description: A comma-separated list of service overrides. E.g. "-elasticsearch,+opensearch"
|
||||
REPORT_TYPE:
|
||||
type: choice
|
||||
description: The context this report is being generated in
|
||||
@@ -33,6 +38,14 @@ on:
|
||||
- CLOUD_UNSTABLE
|
||||
- NONE
|
||||
default: NONE
|
||||
RUN_CYPRESS:
|
||||
type: boolean
|
||||
description: Enable Cypress run
|
||||
default: true
|
||||
RUN_PLAYWRIGHT:
|
||||
type: boolean
|
||||
description: Enable Playwright run
|
||||
default: true
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ inputs.REPORT_TYPE }}-${{ inputs.PR_NUMBER || inputs.ref }}-${{ inputs.MM_ENV }}"
|
||||
@@ -89,6 +102,7 @@ jobs:
|
||||
--sortFirst="@compliance_export,@elasticsearch,@ldap_group,@ldap,@playbooks"
|
||||
--sortLast="@saml,@keycloak,@plugin,@plugins_uninstall,@mfa"
|
||||
MM_ENV: "${{ inputs.MM_ENV || '' }}"
|
||||
MM_SERVICE_OVERRIDES: "${{ inputs.MM_SERVICE_OVERRIDES }}"
|
||||
steps:
|
||||
- name: ci/checkout-repo
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
@@ -169,6 +183,16 @@ jobs:
|
||||
### Run sanity assertions after variable generations
|
||||
git show-ref --verify "refs/tags/${ROLLING_RELEASE_FROM_TAG}" # 'inputs.ROLLING_RELEASE_FROM_TAG' must be a tag, for release report types
|
||||
fi
|
||||
ENABLED_DOCKER_SERVICES="postgres inbucket minio openldap elasticsearch keycloak"
|
||||
for SVC_OP in $(tr , ' '<<"$MM_SERVICE_OVERRIDES"); do
|
||||
OP=$(cut -c1 <<<$SVC_OP)
|
||||
SVC=$(cut -c2- <<<$SVC_OP)
|
||||
case "$OP" in
|
||||
"+") ENABLED_DOCKER_SERVICES="$ENABLED_DOCKER_SERVICES $SVC" ;;
|
||||
"-") ENABLED_DOCKER_SERVICES=$(sed -E "s:(^| )${SVC}( |\$): :g" <<<"$ENABLED_DOCKER_SERVICES") ;;
|
||||
*) echo "Invalid MM_SERVICE_OVERRIDE value: $SVC_OP"; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
# BUILD_ID format: $pipelineID-$imageTag-$testType-$serverType-$serverEdition
|
||||
# Reference on BUILD_ID parsing: https://github.com/saturninoabril/automation-dashboard/blob/175891781bf1072c162c58c6ec0abfc5bcb3520e/lib/common_utils.ts#L3-L23
|
||||
BUILD_ID="${{ github.run_id }}_${{ github.run_attempt }}-${SERVER_IMAGE_TAG}-${BUILD_ID_SUFFIX}"
|
||||
@@ -177,7 +201,7 @@ jobs:
|
||||
echo "SERVER_IMAGE=${SERVER_IMAGE_ORG}/mattermost-enterprise-edition:${SERVER_IMAGE_TAG}" >> $GITHUB_OUTPUT
|
||||
echo "SERVER=${SERVER}" >> $GITHUB_OUTPUT
|
||||
echo "server_uppercase=${SERVER@U}" >> $GITHUB_OUTPUT
|
||||
echo "ENABLED_DOCKER_SERVICES=postgres inbucket minio openldap elasticsearch keycloak" >> $GITHUB_OUTPUT
|
||||
echo "ENABLED_DOCKER_SERVICES=${ENABLED_DOCKER_SERVICES}" >> $GITHUB_OUTPUT
|
||||
echo "status_check_context=E2E Tests/test${BUILD_ID_SUFFIX_IN_STATUS_CHECK:+-$BUILD_ID_SUFFIX}${MM_ENV:+/$MM_ENV_HASH}" >> $GITHUB_OUTPUT
|
||||
echo "workers_number=${WORKERS_NUMBER}" >> $GITHUB_OUTPUT
|
||||
echo "TEST_FILTER_CYPRESS=${TEST_FILTER_CYPRESS}" >> $GITHUB_OUTPUT
|
||||
@@ -195,14 +219,17 @@ jobs:
|
||||
STATUS_CHECK_CONTEXT: "${{steps.generate.outputs.status_check_context}}"
|
||||
WORKFLOW_RUN_URL: "${{steps.generate.outputs.WORKFLOW_RUN_URL}}"
|
||||
CYCLE_URL: "${{steps.generate.outputs.CYCLE_URL}}"
|
||||
RUN_CYPRESS: "${{inputs.RUN_CYPRESS || ''}}"
|
||||
RUN_PLAYWRIGHT: "${{inputs.RUN_PLAYWRIGHT || ''}}"
|
||||
run: |
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
gh issue -R "${{ github.repository }}" comment "$PR_NUMBER" --body-file - <<EOF
|
||||
E2E test run is starting for commit \`${COMMIT_SHA}\`${MM_ENV:+, with \`MM_ENV=$MM_ENV\`}.
|
||||
You can check its progress by either:
|
||||
- Looking at the corresponding commit statuses: \`${STATUS_CHECK_CONTEXT}\` and \`${STATUS_CHECK_CONTEXT}-playwright\`.
|
||||
- Looking at the [E2E test's Workflow Run]($WORKFLOW_RUN_URL), with Run ID \`${{ github.run_id }}\`.
|
||||
- Looking at the [E2E test's Cycle on the Automation Dashboard]($CYCLE_URL). (Cypress only)
|
||||
E2E test run is starting for commit \`${COMMIT_SHA}\`${MM_ENV:+, with \`MM_ENV=$MM_ENV\`}${MM_SERVICE_OVERRIDES:+, Cypress service overrides \`$MM_SERVICE_OVERRIDES\`}.
|
||||
To check the run progress:
|
||||
- Cypress: ${RUN_CYPRESS:+look for commit status \`$STATUS_CHECK_CONTEXT\` or the access the [Automation Dashboard Cycle URL]($CYCLE_URL)}$([ -n "${RUN_CYPRESS:-}" ] || echo -n "will not run").
|
||||
- Playwright: ${RUN_PLAYWRIGHT:+look for commit status \`$STATUS_CHECK_CONTEXT-playwright\`}$([ -n "${RUN_PLAYWRIGHT:-}" ] || echo -n "will not run").
|
||||
|
||||
You can also look at the [E2E test's Workflow Run URL]($WORKFLOW_RUN_URL) (run ID \`${{ github.run_id }}\`).
|
||||
EOF
|
||||
fi
|
||||
|
||||
@@ -210,10 +237,7 @@ jobs:
|
||||
needs:
|
||||
- generate-test-variables
|
||||
uses: ./.github/workflows/e2e-tests-ci-template.yml
|
||||
strategy:
|
||||
matrix:
|
||||
type:
|
||||
- name: PR
|
||||
if: ${{ inputs.RUN_CYPRESS }}
|
||||
with:
|
||||
commit_sha: "${{ needs.generate-test-variables.outputs.commit_sha }}"
|
||||
status_check_context: "${{ needs.generate-test-variables.outputs.status_check_context }}"
|
||||
@@ -246,10 +270,7 @@ jobs:
|
||||
needs:
|
||||
- generate-test-variables
|
||||
uses: ./.github/workflows/e2e-tests-ci-template.yml
|
||||
strategy:
|
||||
matrix:
|
||||
type:
|
||||
- name: PR
|
||||
if: ${{ inputs.RUN_PLAYWRIGHT }}
|
||||
with:
|
||||
commit_sha: "${{ needs.generate-test-variables.outputs.commit_sha }}"
|
||||
status_check_context: "${{ needs.generate-test-variables.outputs.status_check_context }}-playwright"
|
||||
@@ -295,6 +316,8 @@ jobs:
|
||||
STATUS_CHECK_CONTEXT: "${{ needs.generate-test-variables.outputs.status_check_context }}"
|
||||
WORKFLOW_RUN_URL: "${{ needs.generate-test-variables.outputs.WORKFLOW_RUN_URL }}"
|
||||
CYCLE_URL: "${{ needs.generate-test-variables.outputs.CYCLE_URL }}"
|
||||
RUN_CYPRESS: "${{inputs.RUN_CYPRESS || ''}}"
|
||||
RUN_PLAYWRIGHT: "${{inputs.RUN_PLAYWRIGHT || ''}}"
|
||||
steps:
|
||||
- name: ci/notify-user-test-completion
|
||||
run: |
|
||||
@@ -302,8 +325,9 @@ jobs:
|
||||
gh issue -R "${{ github.repository }}" comment "$PR_NUMBER" --body-file - <<EOF
|
||||
E2E test has completed for commit \`${COMMIT_SHA}\`${MM_ENV:+, with \`MM_ENV=$MM_ENV\`}.
|
||||
Results summary:
|
||||
- Cypress pass rate: ${{ needs.e2e-fulltest-cypress.outputs.pass_rate || 'unknown' }} (see [Automation Dashboard]($CYCLE_URL) and commit status check \`${STATUS_CHECK_CONTEXT}\`)
|
||||
- Playwright pass rate: ${{ needs.e2e-fulltest-playwright.outputs.pass_rate || 'unknown' }} (see commit status check \`${STATUS_CHECK_CONTEXT}-playwright\`)
|
||||
- Cypress: ${RUN_CYPRESS:+pass rate is \`${{ needs.e2e-fulltest-cypress.outputs.pass_rate || 'unknown' }}\` (see [Automation Dashboard]($CYCLE_URL) and commit status check \`$STATUS_CHECK_CONTEXT\`)}$([ -n "${RUN_CYPRESS:-}" ] || echo -n "did not run").
|
||||
- Playwright: ${RUN_PLAYWRIGHT:+pass rate is \`${{ needs.e2e-fulltest-playwright.outputs.pass_rate || 'unknown' }}\` (see commit status check \`$STATUS_CHECK_CONTEXT-playwright\`)}$([ -n "${RUN_PLAYWRIGHT:-}" ] || echo -n "did not run").
|
||||
|
||||
The run summary artifacts are available in the corresponding [Workflow Run]($WORKFLOW_RUN_URL).
|
||||
EOF
|
||||
fi
|
||||
|
||||
@@ -103,8 +103,13 @@ case "${TEST:-$TEST_DEFAULT}" in
|
||||
esac
|
||||
# OS specific defaults overrides
|
||||
case $MME2E_OSTYPE in
|
||||
linux )
|
||||
export IS_LINUX="-linux"
|
||||
;;
|
||||
darwin )
|
||||
BROWSER_DEFAULT="electron" ;;
|
||||
export BROWSER_DEFAULT="electron"
|
||||
export IS_LINUX=""
|
||||
;;
|
||||
* )
|
||||
esac
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ enable_docker_service() {
|
||||
|
||||
assert_docker_services_validity() {
|
||||
local SERVICES_TO_CHECK="$*"
|
||||
local SERVICES_VALID="postgres minio inbucket openldap elasticsearch keycloak cypress webhook-interactions playwright"
|
||||
local SERVICES_VALID="postgres minio inbucket openldap elasticsearch opensearch redis keycloak cypress webhook-interactions playwright"
|
||||
local SERVICES_REQUIRED="postgres inbucket"
|
||||
for SERVICE_NAME in $SERVICES_TO_CHECK; do
|
||||
if ! mme2e_is_token_in_list "$SERVICE_NAME" "$SERVICES_VALID"; then
|
||||
@@ -78,82 +78,140 @@ $(if mme2e_is_token_in_list "postgres" "$ENABLED_DOCKER_SERVICES"; then
|
||||
echo '
|
||||
postgres:
|
||||
image: mattermostdevelopment/mirrored-postgres:12
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: mmuser
|
||||
POSTGRES_PASSWORD: mostest
|
||||
POSTGRES_DB: mattermost_test
|
||||
command: postgres -c "config_file=/etc/postgresql/postgresql.conf"
|
||||
volumes:
|
||||
- ../../server/build/docker/postgres.conf:/etc/postgresql/postgresql.conf
|
||||
restart: "no"
|
||||
network_mode: host
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-h", "localhost"]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12'
|
||||
networks: !reset []
|
||||
extends:
|
||||
file: ../../server/build/docker-compose.common.yml
|
||||
service: postgres'
|
||||
fi)
|
||||
|
||||
$(if mme2e_is_token_in_list "inbucket" "$ENABLED_DOCKER_SERVICES"; then
|
||||
echo '
|
||||
inbucket:
|
||||
restart: "no"
|
||||
network_mode: host
|
||||
networks: !reset []
|
||||
restart: "no"
|
||||
extends:
|
||||
file: ../../server/build/gitlab-dc.common.yml
|
||||
service: inbucket'
|
||||
file: ../../server/build/docker-compose.common.yml
|
||||
service: inbucket
|
||||
healthcheck:
|
||||
test: [ "CMD", "nc", "-z", "-w1", "127.0.0.1", "10025" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12'
|
||||
fi)
|
||||
|
||||
$(if mme2e_is_token_in_list "minio" "$ENABLED_DOCKER_SERVICES"; then
|
||||
echo '
|
||||
minio:
|
||||
restart: "no"
|
||||
network_mode: host
|
||||
networks: !reset []
|
||||
restart: "no"
|
||||
extends:
|
||||
file: ../../server/build/gitlab-dc.common.yml
|
||||
service: minio'
|
||||
file: ../../server/build/docker-compose.common.yml
|
||||
service: minio
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-f", "127.0.0.1:9000/minio/health/live" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12'
|
||||
fi)
|
||||
|
||||
$(if mme2e_is_token_in_list "openldap" "$ENABLED_DOCKER_SERVICES"; then
|
||||
echo '
|
||||
openldap:
|
||||
restart: "no"
|
||||
network_mode: host
|
||||
networks: !reset []
|
||||
restart: "no"
|
||||
extends:
|
||||
file: ../../server/build/gitlab-dc.common.yml
|
||||
service: openldap'
|
||||
file: ../../server/build/docker-compose.common.yml
|
||||
service: openldap
|
||||
healthcheck:
|
||||
test: [ "CMD", "bash", "-o", "pipefail", "-c", "ss -ltn \"sport = :636\" | grep -qE \"^LISTEN\"" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12'
|
||||
fi)
|
||||
|
||||
$(if mme2e_is_token_in_list "elasticsearch" "$ENABLED_DOCKER_SERVICES"; then
|
||||
echo '
|
||||
elasticsearch:
|
||||
restart: "no"
|
||||
network_mode: host
|
||||
networks: !reset []
|
||||
environment:
|
||||
xpack.security.enabled: "false"
|
||||
action.destructive_requires_name: "false"
|
||||
extends:
|
||||
file: ../../server/build/docker-compose.common.yml
|
||||
service: elasticsearch
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-fsS", "localhost:9200/_cluster/health?wait_for_status=green&timeout=5s" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12'
|
||||
if [ "$MME2E_ARCHTYPE" = "arm64" ]; then
|
||||
echo '
|
||||
elasticsearch:
|
||||
image: mattermostdevelopment/mattermost-elasticsearch:8.9.0
|
||||
platform: linux/arm64/v8
|
||||
restart: "no"
|
||||
network_mode: host
|
||||
extends:
|
||||
file: ../../server/build/gitlab-dc.common.yml
|
||||
service: elasticsearch'
|
||||
else
|
||||
echo '
|
||||
elasticsearch:
|
||||
restart: "no"
|
||||
network_mode: host
|
||||
extends:
|
||||
file: ../../server/build/gitlab-dc.common.yml
|
||||
service: elasticsearch'
|
||||
platform: linux/arm64/v8'
|
||||
fi
|
||||
fi)
|
||||
|
||||
$(if mme2e_is_token_in_list "opensearch" "$ENABLED_DOCKER_SERVICES"; then
|
||||
echo '
|
||||
opensearch:
|
||||
restart: "no"
|
||||
network_mode: host
|
||||
networks: !reset []
|
||||
environment:
|
||||
http.port: 9200
|
||||
extends:
|
||||
file: ../../server/build/docker-compose.common.yml
|
||||
service: opensearch
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-fsS", "localhost:9200/_cluster/health?wait_for_status=green&timeout=5s" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12'
|
||||
fi)
|
||||
|
||||
$(if mme2e_is_token_in_list "redis" "$ENABLED_DOCKER_SERVICES"; then
|
||||
echo '
|
||||
redis:
|
||||
restart: "no"
|
||||
network_mode: host
|
||||
networks: !reset []
|
||||
extends:
|
||||
file: ../../server/build/docker-compose.common.yml
|
||||
service: redis
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12'
|
||||
fi)
|
||||
|
||||
$(if mme2e_is_token_in_list "keycloak" "$ENABLED_DOCKER_SERVICES"; then
|
||||
echo '
|
||||
keycloak:
|
||||
restart: "no"
|
||||
network_mode: host
|
||||
networks: !reset []
|
||||
environment:
|
||||
JAVA_OPTS: "-Xms64m -Xmx2G -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true"
|
||||
volumes:
|
||||
- "../../server/build/docker/keycloak/realm-export.json:/opt/keycloak/data/import/realm-export.json"
|
||||
- "../../server/build/docker/keycloak/kc-healthcheck.sh:/usr/local/bin/kc-healthcheck.sh"
|
||||
extends:
|
||||
file: ../../server/build/gitlab-dc.common.yml
|
||||
service: keycloak'
|
||||
file: ../../server/build/docker-compose.common.yml
|
||||
service: keycloak
|
||||
healthcheck:
|
||||
# We cannot use a simple curl --silent localhost:9990/health | grep -q \"status\":\"UP\" because theres no curl in the image: https://www.keycloak.org/server/health#_using_the_health_checks
|
||||
test: [ "CMD", "/usr/local/bin/kc-healthcheck.sh" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12'
|
||||
fi)
|
||||
|
||||
$(if mme2e_is_token_in_list "cypress" "$ENABLED_DOCKER_SERVICES"; then
|
||||
@@ -274,6 +332,15 @@ generate_env_files() {
|
||||
echo "$env" >>.env.server
|
||||
done
|
||||
|
||||
# Generating service-specific env vars
|
||||
for SERVICE in $ENABLED_DOCKER_SERVICES; do
|
||||
case $SERVICE in
|
||||
opensearch)
|
||||
echo "MM_ELASTICSEARCHSETTINGS_BACKEND=opensearch" >>.env.server
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Generating TEST-specific env files
|
||||
# Some are defaulted in .e2erc due to being needed to other scripts as well
|
||||
export REPO=mattermost # Static, but declared here for making generate_test_cycle.js easier to run
|
||||
@@ -305,7 +372,7 @@ generate_env_files() {
|
||||
keycloak)
|
||||
echo "CYPRESS_keycloakBaseUrl=http://localhost:8484" >>.env.cypress
|
||||
;;
|
||||
elasticsearch)
|
||||
elasticsearch|opensearch)
|
||||
echo "CYPRESS_elasticsearchConnectionURL=http://localhost:9200" >>.env.cypress
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -10,7 +10,7 @@ mme2e_wait_image "$SERVER_IMAGE" 4 30
|
||||
# Launch mattermost-server, and wait for it to be healthy
|
||||
mme2e_log "Starting E2E containers"
|
||||
${MME2E_DC_SERVER} create
|
||||
${MME2E_DC_SERVER} up -d
|
||||
${MME2E_DC_SERVER} up -d --remove-orphans
|
||||
if ! mme2e_wait_service_healthy server 60 10; then
|
||||
mme2e_log "Mattermost container not healthy, retry attempts exhausted. Giving up." >&2
|
||||
exit 1
|
||||
|
||||
@@ -78,13 +78,13 @@ describe('MM-T2574 Session Lengths', () => {
|
||||
},
|
||||
};
|
||||
|
||||
cy.get('#extendSessionLengthWithActivityfalse').check();
|
||||
cy.get('#extendSessionLengthWithActivityfalse').should('exist').check();
|
||||
Object.entries(helpText).forEach(([key, value]) => {
|
||||
cy.findByTestId(key).should('exist');
|
||||
cy.findByTestId(`${key}help-text`).should('have.text', value.false);
|
||||
});
|
||||
|
||||
cy.get('#extendSessionLengthWithActivitytrue').check();
|
||||
cy.get('#extendSessionLengthWithActivitytrue').should('exist').check();
|
||||
Object.entries(helpText).forEach(([key, value]) => {
|
||||
if (value.true) {
|
||||
cy.findByTestId(key).should('exist');
|
||||
|
||||
@@ -101,11 +101,11 @@ describe('Integrations page', () => {
|
||||
const cId = clientID as unknown as string;
|
||||
cy.contains('.item-details', cId).within(() => {
|
||||
// * Copy button should exist for Client ID
|
||||
cy.contains('.item-details__token', 'Client ID').within(() => {
|
||||
cy.contains('.item-details__token', 'Client ID').should('exist').within(() => {
|
||||
cy.get('.fa-copy').should('exist');
|
||||
});
|
||||
|
||||
cy.contains('.item-details__token', 'Client Secret').within(() => {
|
||||
cy.contains('.item-details__token', 'Client Secret').should('exist').within(() => {
|
||||
// * Client secret should not show
|
||||
cy.contains('*******************').should('exist');
|
||||
|
||||
@@ -120,7 +120,7 @@ describe('Integrations page', () => {
|
||||
cy.findByText('Hide Secret').should('exist');
|
||||
cy.findByText('Show Secret').should('not.exist');
|
||||
|
||||
cy.contains('.item-details__token', 'Client Secret').within(() => {
|
||||
cy.contains('.item-details__token', 'Client Secret').should('exist').within(() => {
|
||||
// * Token should not be obscured
|
||||
cy.contains('*******************').should('not.exist');
|
||||
|
||||
|
||||
@@ -394,6 +394,9 @@ describe('Integrations page', () => {
|
||||
// # Enter a request url for custom slash command
|
||||
cy.findByLabelText('Request URL').should('exist').scrollIntoView().type('https://example.com');
|
||||
|
||||
// # Enter the desired request method
|
||||
cy.findByLabelText('Request Method').should('exist').scrollIntoView().select('GET');
|
||||
|
||||
// # Check the option of autocomplete
|
||||
cy.findByLabelText('Autocomplete').should('exist').scrollIntoView().click();
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ describe('System Console > User Management > Users', () => {
|
||||
it('MM-T933 Users - System admin changes own password - Cancel out of changes', () => {
|
||||
// # Search for the admin.
|
||||
cy.findByPlaceholderText('Search users').type(otherAdmin.username).wait(TIMEOUTS.HALF_SEC);
|
||||
cy.get('#systemUsersTable-cell-0_emailColumn').should('contain', otherAdmin.email);
|
||||
|
||||
// # Open the actions menu.
|
||||
cy.get('#systemUsersTable-cell-0_actionsColumn').click().wait(TIMEOUTS.HALF_SEC);
|
||||
@@ -123,6 +124,7 @@ describe('System Console > User Management > Users', () => {
|
||||
it('MM-T934 Users - System admin changes own password - Incorrect old password', () => {
|
||||
// # Search for the admin.
|
||||
cy.findByPlaceholderText('Search users').type(otherAdmin.username).wait(TIMEOUTS.HALF_SEC);
|
||||
cy.get('#systemUsersTable-cell-0_emailColumn').should('contain', otherAdmin.email);
|
||||
|
||||
// # Open the actions menu.
|
||||
cy.get('#systemUsersTable-cell-0_actionsColumn').click().wait(TIMEOUTS.HALF_SEC);
|
||||
@@ -145,6 +147,7 @@ describe('System Console > User Management > Users', () => {
|
||||
it('MM-T935 Users - System admin changes own password - Invalid new password', () => {
|
||||
// # Search for the admin.
|
||||
cy.findByPlaceholderText('Search users').type(otherAdmin.username).wait(TIMEOUTS.HALF_SEC);
|
||||
cy.get('#systemUsersTable-cell-0_emailColumn').should('contain', otherAdmin.email);
|
||||
|
||||
// # Open the actions menu.
|
||||
cy.get('#systemUsersTable-cell-0_actionsColumn').click().wait(TIMEOUTS.HALF_SEC);
|
||||
@@ -167,6 +170,7 @@ describe('System Console > User Management > Users', () => {
|
||||
it('MM-T936 Users - System admin changes own password - Blank fields', () => {
|
||||
// # Search for the admin.
|
||||
cy.findByPlaceholderText('Search users').type(otherAdmin.username).wait(TIMEOUTS.HALF_SEC);
|
||||
cy.get('#systemUsersTable-cell-0_emailColumn').should('contain', otherAdmin.email);
|
||||
|
||||
// # Open the actions menu.
|
||||
cy.get('#systemUsersTable-cell-0_actionsColumn').click().wait(TIMEOUTS.HALF_SEC);
|
||||
@@ -195,6 +199,7 @@ describe('System Console > User Management > Users', () => {
|
||||
it('MM-T937 Users - System admin changes own password - Successfully changed', () => {
|
||||
// # Search for the admin.
|
||||
cy.findByPlaceholderText('Search users').type(otherAdmin.username).wait(TIMEOUTS.HALF_SEC);
|
||||
cy.get('#systemUsersTable-cell-0_emailColumn').should('contain', otherAdmin.email);
|
||||
|
||||
// # Open the actions menu.
|
||||
cy.get('#systemUsersTable-cell-0_actionsColumn').click().wait(TIMEOUTS.HALF_SEC);
|
||||
|
||||
2
e2e-tests/playwright/package-lock.json
сгенерированный
2
e2e-tests/playwright/package-lock.json
сгенерированный
@@ -14,7 +14,7 @@
|
||||
"async-wait-until": "2.0.12",
|
||||
"axe-core": "4.10.0",
|
||||
"chalk": "4.1.2",
|
||||
"dayjs": "^1.11.13",
|
||||
"dayjs": "1.11.13",
|
||||
"deepmerge": "4.3.1",
|
||||
"dotenv": "16.4.5",
|
||||
"form-data-encoder": "4.0.2",
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
version: '2.4'
|
||||
services:
|
||||
minio:
|
||||
image: mattermostdevelopment/mirrored-minio:RELEASE.2019-10-11T00-38-09Z-1
|
||||
command: "server /data"
|
||||
environment:
|
||||
MINIO_ACCESS_KEY: minioaccesskey
|
||||
MINIO_SECRET_KEY: miniosecretkey
|
||||
MINIO_SSE_MASTER_KEY: "my-minio-key:6368616e676520746869732070617373776f726420746f206120736563726574"
|
||||
healthcheck:
|
||||
test: [ "CMD", "nc", "-z", "-w1", "127.0.0.1", "9000" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12
|
||||
inbucket:
|
||||
image: mattermostdevelopment/mirrored-inbucket:3.0.0
|
||||
restart: always
|
||||
environment:
|
||||
INBUCKET_WEB_ADDR: "0.0.0.0:9001"
|
||||
INBUCKET_POP3_ADDR: "0.0.0.0:10110"
|
||||
INBUCKET_SMTP_ADDR: "0.0.0.0:10025"
|
||||
healthcheck:
|
||||
test: [ "CMD", "nc", "-z", "-w1", "127.0.0.1", "10025" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12
|
||||
openldap:
|
||||
image: mattermostdevelopment/mirrored-openldap:1.4.0
|
||||
restart: always
|
||||
environment:
|
||||
LDAP_TLS_VERIFY_CLIENT: "never"
|
||||
LDAP_ORGANISATION: "Mattermost Test"
|
||||
LDAP_DOMAIN: "mm.test.com"
|
||||
LDAP_ADMIN_PASSWORD: "mostest"
|
||||
healthcheck:
|
||||
test: [ "CMD", "bash", "-o", "pipefail", "-c", "ss -ltn 'sport = :636' | grep -qE '^LISTEN'" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12
|
||||
elasticsearch:
|
||||
image: mattermost/mattermost-elasticsearch-docker:7.17.3
|
||||
environment:
|
||||
http.host: "0.0.0.0"
|
||||
http.port: 9200
|
||||
http.cors.enabled: "true"
|
||||
http.cors.allow-origin: "http://localhost:1358,http://127.0.0.1:1358"
|
||||
http.cors.allow-headers: "X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization"
|
||||
http.cors.allow-credentials: "true"
|
||||
transport.host: "127.0.0.1"
|
||||
ES_JAVA_OPTS: "-Xms512m -Xmx2G"
|
||||
healthcheck:
|
||||
test: [ "CMD", "bash", "-o", "pipefail", "-c", "curl --silent localhost:9200/_cat/health | awk '{ print $$4 }' | grep -qE '^green$$'" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12
|
||||
dejavu:
|
||||
image: mattermostdevelopment/mirrored-dejavu:3.4.2
|
||||
healthcheck:
|
||||
test: [ "CMD", "nc", "-z", "-w1", "127.0.0.1", "1358" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12
|
||||
keycloak:
|
||||
image: quay.io/keycloak/keycloak:23.0.7
|
||||
restart: always
|
||||
entrypoint: /opt/keycloak/bin/kc.sh start --import-realm
|
||||
environment:
|
||||
KEYCLOAK_ADMIN: admin
|
||||
KEYCLOAK_ADMIN_PASSWORD: admin
|
||||
KC_HOSTNAME_STRICT: 'false'
|
||||
KC_HOSTNAME_STRICT_HTTPS: 'false'
|
||||
KC_HTTP_ENABLED: 'true'
|
||||
JAVA_OPTS: "-Xms64m -Xmx2G -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true"
|
||||
volumes:
|
||||
- "./docker/keycloak/realm-export.json:/opt/keycloak/data/import/realm-export.json"
|
||||
- "./docker/keycloak/kc-healthcheck.sh:/usr/local/bin/kc-healthcheck.sh"
|
||||
healthcheck:
|
||||
# We can't use a simple 'curl --silent localhost:9990/health | grep -q \"status\":\"UP\"' because there's no curl in the image: https://www.keycloak.org/server/health#_using_the_health_checks
|
||||
test: [ "CMD", "/usr/local/bin/kc-healthcheck.sh" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12
|
||||
prometheus:
|
||||
image: mattermostdevelopment/mirrored-prometheus:v2.27.1
|
||||
volumes:
|
||||
- "./docker/prometheus-linux.yml:/etc/prometheus/prometheus.yml"
|
||||
healthcheck:
|
||||
test: [ "CMD", "wget", "-q", "-O-", "127.0.0.1:9090/-/ready" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12
|
||||
# wget -q -O- localhost:3000/healthz | grep -q Ok
|
||||
grafana:
|
||||
image: mattermostdevelopment/mirrored-grafana:8.0.1
|
||||
volumes:
|
||||
- "./docker/grafana/grafana.ini:/etc/grafana/grafana.ini"
|
||||
- "./docker/grafana/provisioning:/etc/grafana/provisioning"
|
||||
- "./docker/grafana/dashboards:/var/lib/grafana/dashboards"
|
||||
healthcheck:
|
||||
test: [ "CMD", "bash", "-o", "pipefail", "-c", "wget -q -O- localhost:3000/healthz | grep -q Ok" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12
|
||||
@@ -1,100 +0,0 @@
|
||||
version: '2.4'
|
||||
services:
|
||||
mysql:
|
||||
image: mattermostdevelopment/mirrored-mysql:8.0.32
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_HOST: "%"
|
||||
MYSQL_ROOT_PASSWORD: mostest
|
||||
MYSQL_PASSWORD: mostest
|
||||
MYSQL_USER: mmuser
|
||||
MYSQL_DATABASE: mattermost_test
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
tmpfs: /var/lib/mysql
|
||||
volumes:
|
||||
- "./docker/mysql.conf.d:/etc/mysql/conf.d"
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- mysql
|
||||
minio:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: minio
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- minio
|
||||
inbucket:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: inbucket
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- inbucket
|
||||
openldap:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: openldap
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- openldap
|
||||
elasticsearch:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: elasticsearch
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- elasticsearch
|
||||
dejavu:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: dejavu
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- dejavu
|
||||
keycloak:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: keycloak
|
||||
prometheus:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: prometheus
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- prometheus
|
||||
grafana:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: grafana
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- grafana
|
||||
|
||||
start_dependencies:
|
||||
image: mattermost/mattermost-wait-for-dep:latest
|
||||
depends_on:
|
||||
- mysql
|
||||
- minio
|
||||
- inbucket
|
||||
- openldap
|
||||
- elasticsearch
|
||||
command: mysql:3306 minio:9000 inbucket:9001 openldap:389 elasticsearch:9200
|
||||
networks:
|
||||
default:
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: ${COMPOSE_PROJECT_NAME}
|
||||
external: true
|
||||
@@ -1,98 +0,0 @@
|
||||
version: '2.4'
|
||||
services:
|
||||
postgres:
|
||||
image: mattermostdevelopment/mirrored-postgres:12
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: mmuser
|
||||
POSTGRES_PASSWORD: mostest
|
||||
POSTGRES_DB: mattermost_test
|
||||
command: postgres -c 'config_file=/etc/postgresql/postgresql.conf'
|
||||
volumes:
|
||||
- "./docker/postgres.conf:/etc/postgresql/postgresql.conf"
|
||||
healthcheck:
|
||||
test: [ "CMD", "pg_isready", "-h", "localhost" ]
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 12
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- postgres
|
||||
minio:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: minio
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- minio
|
||||
inbucket:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: inbucket
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- inbucket
|
||||
openldap:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: openldap
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- openldap
|
||||
elasticsearch:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: elasticsearch
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- elasticsearch
|
||||
dejavu:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: dejavu
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- dejavu
|
||||
keycloak:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: keycloak
|
||||
prometheus:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: prometheus
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- prometheus
|
||||
grafana:
|
||||
extends:
|
||||
file: gitlab-dc.common.yml
|
||||
service: grafana
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- grafana
|
||||
|
||||
start_dependencies:
|
||||
image: mattermost/mattermost-wait-for-dep:latest
|
||||
depends_on:
|
||||
- postgres
|
||||
- minio
|
||||
- inbucket
|
||||
- openldap
|
||||
- elasticsearch
|
||||
command: postgres:5432 minio:9000 inbucket:9001 openldap:389 elasticsearch:9200
|
||||
networks:
|
||||
default:
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: ${COMPOSE_PROJECT_NAME}
|
||||
external: true
|
||||
@@ -1,36 +0,0 @@
|
||||
version: '2.4'
|
||||
services:
|
||||
mysql:
|
||||
image: mattermostdevelopment/mirrored-mysql:8.0.32
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_HOST: "%"
|
||||
MYSQL_ROOT_PASSWORD: mostest
|
||||
MYSQL_PASSWORD: mostest
|
||||
MYSQL_USER: mmuser
|
||||
MYSQL_DATABASE: mattermost_test
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
tmpfs: /var/lib/mysql
|
||||
volumes:
|
||||
- "./docker/mysql.conf.d:/etc/mysql/conf.d"
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- mysql
|
||||
|
||||
start_dependencies:
|
||||
image: mattermost/mattermost-wait-for-dep:latest
|
||||
depends_on:
|
||||
- mysql
|
||||
command: mysql:3306
|
||||
networks:
|
||||
default:
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: ${COMPOSE_PROJECT_NAME}
|
||||
external: true
|
||||
@@ -1,34 +0,0 @@
|
||||
version: '2.4'
|
||||
services:
|
||||
postgres:
|
||||
image: mattermostdevelopment/mirrored-postgres:12
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: mmuser
|
||||
POSTGRES_PASSWORD: mostest
|
||||
POSTGRES_DB: mattermost_test
|
||||
command: postgres -c 'config_file=/etc/postgresql/postgresql.conf'
|
||||
volumes:
|
||||
- "./docker/postgres.conf:/etc/postgresql/postgresql.conf"
|
||||
healthcheck:
|
||||
test: [ "CMD", "pg_isready", "-h", "localhost" ]
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- postgres
|
||||
|
||||
start_dependencies:
|
||||
image: mattermost/mattermost-wait-for-dep:latest
|
||||
depends_on:
|
||||
- postgres
|
||||
command: postgres:5432
|
||||
networks:
|
||||
default:
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: ${COMPOSE_PROJECT_NAME}
|
||||
external: true
|
||||
Ссылка в новой задаче
Block a user