-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move Dev Spaces typescript functional tests, clean up outdated code #22100
Conversation
tests/e2e/constants/TestConstants.ts
Outdated
----------------------------------------------*/ | ||
TS_SELENIUM_TYPESCRIPT_DEBUG_IMAGE: process.env.TS_SELENIUM_TYPESCRIPT_DEBUG_IMAGE || 'quay.io/eclipse/che-nodejs10-ubi:7.35.2', | ||
|
||
TS_SELENIUM_PHP_DEBUG_IMAGE: process.env.TS_SELENIUM_PHP_DEBUG_IMAGE || 'registry.redhat.io/codeready-workspaces/stacks-php-rhel8:latest', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be probably outdated.
Would you revise constants and remove those which havn't been used in tests after clean up of Che Theia tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there no any reference in tests, should I delete it? Nothing uses for example on ci somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there are no other downstream tests but e2e-codeready project.
Upstream CIs are:
- che-operator PR check (Add the Smoke test PR check for Operator repository #22046)
- chectl PR check (Add the Smoke test PR check for chectl repository #22101)
e2eContainer.bind<Sanitizer>(CLASSES.Sanitizer).to(Sanitizer); | ||
e2eContainer.bind<ApiUrlResolver>(CLASSES.ApiUrlResolver).to(ApiUrlResolver); | ||
e2eContainer.bind<WorkspaceHandlingTests>(CLASSES.WorkspaceHandlingTests).to(WorkspaceHandlingTests); | ||
|
||
if (TestConstants.TS_OCP_LOGIN_PAGE_PROVIDER_TITLE === 'DevSandbox') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be simpler to get rid of ICheLoginPage
and use RedHatLoginPage
only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be, but can you help me with the list of instances I should test that loggin is correct?
cc: @ScrewTSW
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, these tests are run against OCP only, including:
- Eclipse Che deployed to dogfooding instance https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com/
- Eclipse Che deployed to OpenShift.CI
- Dev Spaces on test OCP instances
- Dev Spaces on DevSandbox staging
- Dev Spaces on DevSandbox production
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ScrewTSW could you help me to run tests on DevSandbox and dogfooding locally, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nallikaea : I could also help you with runing the test using https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/DevSandbox/job/sandbox-test/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you, done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test build failed:
docker run --shm-size=${shmSize} \\
-v ${WORKSPACE}/report/${USERNAME}:/tmp/report:Z \\
-v ${WORKSPACE}/video/${USERNAME}:/tmp/ffmpeg_report:Z \\
-e TS_SELENIUM_BASE_URL="${accountDsDashboardUrl}" \\
-e TS_SELENIUM_LOG_LEVEL="DEBUG" \\
-e TS_SELENIUM_USERNAME=${USERNAME} \\
-e TS_SELENIUM_PASSWORD=${PASSWORD} \\
-e E2E_OPENSHIFT_TOKEN="${accountToken}" \\
-e DELETE_WORKSPACE_ON_FAILED_TEST=true \\
-e TS_SELENIUM_START_WORKSPACE_TIMEOUT=${START_WORKSPACE_TIMEOUT} \\
-e NODE_TLS_REJECT_UNAUTHORIZED=0 \\
-e TS_SELENIUM_EDITOR=che-code \\
-e USERSTORY=EmptyWorkspace \\
-e TS_OCP_LOGIN_PAGE_PROVIDER_TITLE="DevSandbox" \\
-e TS_SELENIUM_REPORT_FOLDER="/tmp/report" \\
-e VIDEO_RECORDING=true \\
quay.io/crw_pr/che-e2e:22100
...
Running TEST_SUITE: test-happy-path with user: osio-ci-devsandbox-periodic-stg
10:00:34 + ffmpeg_pid=127
10:00:34 + trap kill_ffmpeg 2 15
10:00:34 + echo 'Running TEST_SUITE: test-happy-path with user: osio-ci-devsandbox-periodic-stg'
10:00:34 + npm run test-happy-path
10:00:34 + nohup ffmpeg -y -video_size 1920x1080 -framerate 24 -f x11grab -i :20.0 /tmp/ffmpeg_report/output.mp4
10:00:35 npm ERR! Missing script: "test-happy-path"
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record: EmptyWorkspace test passed being run against Dev Spaces on regular OCP cluster https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/Testing/job/e2e/job/basic/job/typescript-tests/7293/
docker run --shm-size=4096m -p 5920:5920 \
-e TS_SELENIUM_LOAD_PAGE_TIMEOUT=420000 \
-e TS_SELENIUM_BASE_URL=https://devspaces.apps.ocp412.crw-qe.com/ \
-e DELETE_WORKSPACE_ON_FAILED_TEST=true \
-e TS_SELENIUM_START_WORKSPACE_TIMEOUT=600000 \
-e NODE_TLS_REJECT_UNAUTHORIZED=0 \
-e VIDEO_RECORDING=true \
-e E2E_OCP_CLUSTER_API_URL=https://api.ocp412.crw-qe.com:6443/ \
-e TS_SELENIUM_LOG_LEVEL=TRACE \
-e TS_EDITOR_TAB_INTERACTION_TIMEOUT=20_000 \
-e TS_WAIT_LOADER_PRESENCE_TIMEOUT=600000 \
-e OCP_INFRA=PSI \
-v /tmp:/usr/local/bin:Z \
-v /home/hudson/.kube:/home/seluser/.kube:Z \
-v /mnt/hudson_workspace/workspace/Testing/e2e/basic/typescript-tests/test-repo/tests/e2ereport:/tmp/e2e/report:Z \
-v /mnt/hudson_workspace/workspace/Testing/e2e/basic/typescript-tests/test-repo/tests/e2evideo:/tmp/ffmpeg_report:Z \
-e USERSTORY=EmptyWorkspace \
-e TS_SELENIUM_VALUE_OPENSHIFT_OAUTH=true \
-e TS_OCP_LOGIN_PAGE_PROVIDER_TITLE=htpasswd \
-e TS_SELENIUM_OCP_USERNAME=***** \
-e 'TS_SELENIUM_OCP_PASSWORD=******' \
-e TS_SELENIUM_EDITOR=che-code quay.io/crw_pr/che-e2e:22100
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Successful run on DevSandbox: https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/DevSandbox/job/sandbox-test/5716/console
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And there is successful run against downstream Dev Spaces: https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/Testing/job/e2e/job/basic/job/typescript-tests/7294/
@nallikaea : what do you think about further code simplification, and getting rid of
|
We can do it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems, this can be deleted from the 'TestConstans':
TS_SELENIUM_SINGLE_HOST
TS_SELENIUM_USERNAME
TS_SELENIUM_PASSWORD
TS_SELENIUM_EMAIL_USER
TS_SELENIUM_FIRST_NAME
TS_SELENIUM_LAST_NAME
Is this used anywhere?
@dmytro-ndp @ScrewTSW
IMHO, it should make migration simpler, shouldn't it? |
Agree. |
@dmytro-ndp @nallikaea AFAIK |
TS_SELENIUM_PASSWORD and TS_SELENIUM_USERNAME used in the classes RedHatLoginPage and OcpRedHatLoginPage.
@ScrewTSW @dmytro-ndp @artaleks9 so should we keep it or it outdated pageoblects? |
@nallikaea , @ScrewTSW, @artaleks9 : okay, I have also found https://gitlab.cee.redhat.com/codeready-workspaces/crw-jenkins/-/blob/master/jobs/DevSandbox/sandbox-test.jenkinsfile#L175-177 Let's keep next constants then:
|
I updated PR
|
86cecc2
to
ccf317e
Compare
Signed-off-by: mdolhalo <mdolhalo@redhat.com>
Signed-off-by: mdolhalo <mdolhalo@redhat.com>
Signed-off-by: mdolhalo <mdolhalo@redhat.com>
Signed-off-by: mdolhalo <mdolhalo@redhat.com> Signed-off-by: mdolhalo <mdolhalo@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to merge.
Thanks for handling feedback, @nallikaea !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this PR do?
Screenshot/screencast of this PR
Full log:
test_output_log.txt
None: some tests skipped because of specific cluster set ups.
What issues does this PR fix or reference?
CRW-4091
How to test this PR?
export USERSTORY=Quarkus && npm run test-userstory
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.