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

[Bug] Scorecard tests do not exercise long-running/async job API #986

Open
andrewazores opened this issue Dec 17, 2024 · 0 comments · May be fixed by #989
Open

[Bug] Scorecard tests do not exercise long-running/async job API #986

andrewazores opened this issue Dec 17, 2024 · 0 comments · May be fixed by #989
Labels

Comments

@andrewazores
Copy link
Member

andrewazores commented Dec 17, 2024

Current Behavior

Scorecard tests do not have a websocket server connection, so the report generation request (currently the only long-running job request) was adjusted from expecting a full report JSON response to simply expecting an OK status code and a string ID response body.

Expected Behavior

The scorecard tests should maintain a websocket server connection that can be used to listen for notifications from the server. When testing long-running jobs, like report generation, the scorecards should:

  1. Fire the initial request
  2. Check the response status code and/or Content-Type header. This will indicate whether the response body should be interpreted as a string job ID, or as a JSON response body, or nothing at all (for jobs which do not produce a response body).
  3. If the response was a job ID, the test client should wait for a websocket notification to be emitted which has the expected notification category (ex. report generation) and indicates that the job with the same ID has been completed. Once that notification has been emitted, the client should re-fire the original request.
  4. If the response was a JSON response body, the client should check that the body passes whatever assertions the test wants to make.

Steps To Reproduce

No response

Environment

No response

Anything else?

#985
cryostatio/cryostat#698
cryostatio/cryostat#286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant