Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-1779

Delete only testing workspace when E2E test run with "-e DELETE_WORKSPACE_ON_FAILED_TEST=true"

XMLWordPrintable

    • 3
    • False
    • False
    • Undefined

      When we are running several E2E tests in parallel, failed test is breaking execution of other tests on clean up step, when "TestWorkspaceUtil.cleanUpAllWorkspaces()" is called, to handler parameter "-e DELETE_WORKSPACE_ON_FAILED_TEST=true".

      So, we need to fix clean up step, so that TestWorkspaceUtil removes only those test workspace, which failed test has created.

      Note: test might not be possible to grab workspace id from URL in case workspace has failed to start, or test has not been able to open IDE from other reasons.

      Possible implementation steps:

      • delete test workspace in CheReporter.runner.on(Fail);
      • get list of all workspaces from codeready server API;
      • filter workspaces names which contain devfile type name;
      • stop all workspaces by name (wait on stop);
      • delete all workspaces by name (wait on deletion);

       

              tdancs Tibor Dancs (Inactive)
              dnochevn Dmytro Nochevnov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: