-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test 'che-smoke-test' as PR checks
* Add 'smoke-test' to OpenShift CI * Add 'pod-che-smoke-test.yaml' component * Add 'startSmokeTest' to 'common.sh' * Update 'pod-oauth-factory-test.yaml' component
- Loading branch information
Showing
4 changed files
with
151 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: che-smoke-test | ||
namespace: CHE-NAMESPACE | ||
spec: | ||
volumes: | ||
- name: test-run-results | ||
- name: ffmpeg-video | ||
- name: dshm | ||
emptyDir: | ||
medium: Memory | ||
containers: | ||
# container containing the tests | ||
- name: test | ||
image: quay.io/eclipse/che-e2e:next | ||
imagePullPolicy: Always | ||
env: | ||
- name: VIDEO_RECORDING | ||
value: "true" | ||
- name: TEST_SUITE | ||
value: "test" | ||
- name: TS_SELENIUM_EDITOR | ||
value: "che-code" | ||
- name: USERSTORY | ||
value: "SmokeTest" | ||
- name: NODE_TLS_REJECT_UNAUTHORIZED | ||
value: "0" | ||
- name: TS_SELENIUM_BASE_URL | ||
value: "CHE_URL" | ||
- name: TS_SELENIUM_LOG_LEVEL | ||
value: "TRACE" | ||
- name: TS_SELENIUM_OCP_USERNAME | ||
value: "OCP_USER_NAME" | ||
- name: TS_SELENIUM_OCP_PASSWORD | ||
value: "OCP_USER_PASSWORD" | ||
- name: TS_SELENIUM_VALUE_OPENSHIFT_OAUTH | ||
value: "true" | ||
- name: TS_OCP_LOGIN_PAGE_PROVIDER_TITLE | ||
value: "htpasswd" | ||
- name: DELETE_WORKSPACE_ON_FAILED_TEST | ||
value: "true" | ||
- name: TS_SELENIUM_START_WORKSPACE_TIMEOUT | ||
value: "360000" | ||
- name: TS_IDE_LOAD_TIMEOUT | ||
value: "40000" | ||
volumeMounts: | ||
- name: test-run-results | ||
mountPath: /tmp/e2e/report/ | ||
- name: ffmpeg-video | ||
mountPath: /tmp/ffmpeg_report/ | ||
- name: dshm | ||
mountPath: /dev/shm | ||
resources: | ||
requests: | ||
memory: "3Gi" | ||
cpu: "2" | ||
limits: | ||
memory: "4Gi" | ||
cpu: "2" | ||
# Download results | ||
- name: download-reports | ||
image: eeacms/rsync | ||
imagePullPolicy: IfNotPresent | ||
volumeMounts: | ||
- name: test-run-results | ||
mountPath: /tmp/e2e/report/ | ||
- name: ffmpeg-video | ||
mountPath: /tmp/ffmpeg_report/ | ||
resources: | ||
command: ["sh"] | ||
args: | ||
[ | ||
"-c", | ||
"while true; if [[ -f /tmp/done ]]; then exit 0; fi; do sleep 1; done", | ||
] | ||
restartPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2024 Red Hat, Inc. | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Contributors: | ||
# Red Hat, Inc. - initial API and implementation | ||
# | ||
|
||
# exit immediately when a command fails | ||
set -ex | ||
# only exit with zero if all commands of the pipeline exit successfully | ||
set -o pipefail | ||
|
||
export TEST_POD_NAME=${TEST_POD_NAME:-"che-smoke-test"} | ||
|
||
# import common test functions | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
source "${SCRIPT_DIR}"/common.sh | ||
|
||
trap "collectLogs" EXIT SIGINT | ||
|
||
provisionOpenShiftOAuthUser | ||
createCustomResourcesFile | ||
deployChe | ||
startSmokeTest |