Certain end-to-end (E2E) tests are not properly closing the testing environment after execution. This can lead to resource leaks and may affect the stability and reliability of subsequent tests.
Solution
To ensure the testing environment is consistently closed, add a defer CloseIntegrationTestEnv() statement in all integration tests (specifically those ending with _e2e_test.go). This will automatically close the environment at the end of each test execution and delete the operator account.
However, if closing the environment causes a test failure, the environment should remain open to avoid interrupting the test flow.
Problem
Solution
defer CloseIntegrationTestEnv()
statement in all integration tests (specifically those ending with_e2e_test.go
). This will automatically close the environment at the end of each test execution and delete the operator account.However, if closing the environment causes a test failure, the environment should remain open to avoid interrupting the test flow.