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

Integration test container should have a wait condition #1086

Closed
michael-valdron opened this issue Mar 29, 2023 · 3 comments · Fixed by devfile/registry-support#170
Closed
Assignees
Labels
area/ci area/integration-tests Enhancement or issue related to the devfile integration tests area/registry Devfile registry for stacks and infrastructure kind/bug Something isn't working

Comments

@michael-valdron
Copy link
Member

michael-valdron commented Mar 29, 2023

Which area this feature is related to?

/kind bug

Which area this bug is related to?

/area ci
/area registry
/area integration-tests

What versions of software are you using?

Go project

Operating System and version: N/A

Go Pkg Version: 1.18

Bug Summary

Describe the bug:

The acceptance tests after staging is deployed are failing due to the tests running before the registry viewer container is ready (could take up to the timeout time of 20 seconds). The default run command for the integration test container performs the tests without waiting for the tied devfile registry deployment to enter the available state.

To Reproduce:

Any triggering of staging at this point could lead to the acceptance tests executing before the devfile registry deployment is available to be tested on.

Expected behavior

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable

Summarizing 1 Failure:
[Fail] [Verify index server is working properly] [It] /viewer should serve the registry viewer
/registry-test/pkg/tests/indexserver_tests.go:76
Ran 30 of 41 Specs in 7.646 seconds
FAIL! -- 29 Passed | 1 Failed | 0 Pending | 11 Skipped
--- FAIL: TestDevfileRegistryController (7.65s)
FAIL

Additional context

Any workaround?

No workaround can be done for this issue.

Suggestion on how to fix the bug

The entrypoint for the integration tests Dockerfile needs to be modified to allow the specification of a wait condition and timeout.

Registry health check probing would ensure target registry is ready before running tests.

Target Date: 04-03-2023

@michael-valdron michael-valdron self-assigned this Mar 29, 2023
@openshift-ci openshift-ci bot added kind/bug Something isn't working area/ci area/registry Devfile registry for stacks and infrastructure area/integration-tests Enhancement or issue related to the devfile integration tests labels Mar 29, 2023
@michael-valdron
Copy link
Member Author

michael-valdron commented Mar 30, 2023

The entrypoint for the integration tests Dockerfile needs to be modified to allow the specification of a wait condition and timeout.

Looking into a simpler alternative solution by probing /health with a timeout in the test suite command.

@michael-valdron
Copy link
Member Author

A few more updates on this issue:

@michael-valdron
Copy link
Member Author

Health check probing is now working, updated README.md to instruct how to enable and use it. Fixed additional issues in the test suite:

  1. Registry viewer test case has been revised to work with the new registry viewer content
  2. Error handling has been added for the getting and setting of environment variables

These changes are under devfile/registry-support#170 and are ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci area/integration-tests Enhancement or issue related to the devfile integration tests area/registry Devfile registry for stacks and infrastructure kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant