Skip to content
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

chore: Add Che update e2e test #1117

Merged
merged 3 commits into from
Mar 1, 2021
Merged

chore: Add Che update e2e test #1117

merged 3 commits into from
Mar 1, 2021

Conversation

mmorhun
Copy link
Contributor

@mmorhun mmorhun commented Feb 25, 2021

Signed-off-by: Mykola Morhun mmorhun@redhat.com

What does this PR do?

Adds new PR check that tests Che update flow using operator installer.
The test does the following:

  1. Deploys latest stable version of Che.
  2. Creates a workspace, starts (waits for RUNNING state) and then stops it.
  3. Updates Che to nightly version (the one under development).
  4. Starts the workspace to check that nothing is wrong with old workspaces.
  5. Downgrades Che back to the latest stable version.

What issues does this PR fix or reference?

eclipse-che/che#19013

How to test this PR?

Run

minikube start && minikube addons enable ingress
yarn test --coverage=false --forceExit --testRegex=test/e2e/e2e-upgrade.test.ts

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
@flacatus
Copy link
Collaborator

/retest

expect(await waitForVersionInCheCR(cheVersion, CHE_VERSION_TIMEOUT_MS)).equal(true)
})
})

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should check that workspace starts after downgrade.... But up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The use-case in the tests, at least my thoughts about it, is that downgrade is used if a user have completed upgrade, but something stopped to work due to a bug, but the user need the feature, so a step back is taken temporally and right after upgrade... So no need in such check.
If a used needs specific version of Che, it is possible to install it via version flag, no need to downgrade.

@@ -85,6 +87,20 @@ export class E2eHelper {
return workspaceStatus
}

async waitWorkspaceStatus(status: string, timeoutMs: number): Promise<boolean> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Usually wait methods return void or throw an error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea is to wait for an event and then decide what to do: fail or continue. But maybe it is not needed for tests...

test/e2e/e2e-upgrade.test.ts Outdated Show resolved Hide resolved
test/e2e/e2e-upgrade.test.ts Outdated Show resolved Hide resolved
test/e2e/e2e-upgrade.test.ts Outdated Show resolved Hide resolved
test/e2e/e2e-upgrade.test.ts Outdated Show resolved Hide resolved
@tolusha tolusha changed the title Add Che update e2e test chore: Add Che update e2e test Mar 1, 2021
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Mar 1, 2021

@mmorhun: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/v5-chectl-e2e-operator-installer 195a5af link /test v5-chectl-e2e-operator-installer
ci/prow/v5-chectl-e2e-olm-installer 195a5af link /test v5-chectl-e2e-olm-installer

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@mmorhun mmorhun merged commit 7b59b61 into master Mar 1, 2021
@mmorhun mmorhun deleted the che-19013 branch March 1, 2021 13:36
@tolusha tolusha mentioned this pull request Mar 1, 2021
57 tasks
@che-bot che-bot added this to the 7.27 milestone Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants