Odo: Some Integration and e2e tests are not properly cleaning up project/namespaces after test execution

Created on 9 Mar 2021  路  4Comments  路  Source: openshift/odo

/kind bug

What versions of software are you using?

Operating System:
Any

Output of odo version:

How did you run odo exactly?

The problem is seen on test triggered by PRs, and when triggered manually

Actual behavior

Some tests clean up the projects/namespaces that were created for execution, but not all of them

Expected behavior

All tests (no matter what test type) must cleanup resources created during execution

Any logs, error output, etc?

Running the following commands to see how many projects are in the cluster

kubectl get projects -o=custom-columns=NAME:.metadata.name | grep -E "^[a-z]{10}$" | wc -l

and this to see the timestamp, many will be older than one day, meaning they do not belong to a current test execution in progress
kubectl get projects -o=custom-columns=NAME:.metadata.name,CREATED:.metadata.creationTimestamp

Proposed solution:
Manually execute each test script and check if projects are left behind after execution is completed to identify the scripts that need to be updated.

kinbug

All 4 comments

I manually ran all tests listed in the Makefile and none of them left projects behind. I will try a different approach.

@rnapoles-rh Isn't this issue same as https://github.com/openshift/odo/issues/4467 . Putting two QE effort on the same issue doesn't make sense, I guess.

@prietyc123 Yesterday during cabal it was agreed that there could be two different causes for project being left behind:

  • some test not cleaning properly after execution
  • PSI jobs failing to complete and the cleanup job will not get executed
    This new issue will take care of the first one.

Made changes to prefix projectNames with the test filename and line number of the test in progress. This will help to identify which tests are leaving projects behind

Was this page helpful?
0 / 5 - 0 ratings