-
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
[E2E] Stop and remove workspace on failed test #14246
Conversation
E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has been successful:
|
Signed-off-by: kkanova <kkanova@redhat.com>
Signed-off-by: kkanova <kkanova@redhat.com>
E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has failed:
|
E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has failed:
|
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
@@ -80,4 +77,15 @@ export class TestWorkspaceUtil { | |||
} | |||
} | |||
|
|||
public async getIdOfRunningWorkspace(namespace: string): Promise<string> { | |||
throw new Error("Method not implemented."); |
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.
I am not sure about this approach. @rhopp What do you think about that?
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.
What approach do you mean? Throwing an error?
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.
I mean approach with the use of plugs instead of implementing realization
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.
I would say let's merge this PR, because I would prefer to not make this PR any bigger then it is and because we don't use/need these methods here right now and implement these methods in following PR (Katka will need this anyway for downstream work :-D).
crw-ci-test |
E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has failed:
|
crw-ci-test |
E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has been successful:
|
What does this PR do?
Currently, when test is run in a
--bail
mode and fails, the workspace remains there. The goal of this PR is to create a mechanism that will stop and remove this workspace.Add environment variable DELETE_WORKSPACE_ON_FAILED_TEST to turn on/off workspace deletion on failed tests.
The logic of creating a container is abstracted from inversify.config.ts to ContainerInitializer. This is the way that would allow us to rebind some classes in upstream.
To be able to dynamicly include the correct ContainerInitializer, the dynamic injection was allowed (change configuration of tslint).
Implementation of TestWorksapceUtil.ts binding were changed to use interface.