ci: Add pytest for chromium-cdp-auth - #428
Open
danielvallance wants to merge 1 commit into
Open
Conversation
Closes: FIELD-628 Signed-off-by: Daniel Vallance <daniel@unikraft.com>
There was a problem hiding this comment.
Pull request overview
Adds an end-to-end pytest for the chromium-cdp-auth example to validate the authentication and token-management flows described in the README.
Changes:
- Introduces a new pytest that provisions a persistent volume, deploys the example with a bootstrap admin token, and validates
/health, CDP auth gating, and admin token APIs. - Exercises token creation/listing/revocation and verifies revoked tokens no longer grant CDP access.
馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+88
to
+91
| # ... and via the ?token= query parameter. | ||
| resp = http(f"{url}/json/version?token={BOOTSTRAP_ADMIN_TOKEN}") | ||
| assert resp.status_code == 200 | ||
| assert "Browser" in resp.text |
Comment on lines
+36
to
+40
| def _cleanup_volume(): | ||
| try: | ||
| unikraft.run(["volume", "delete", volume], check=False) | ||
| log.info("deleted volume %s", volume) | ||
| except Exception: |
Comment on lines
+125
to
+129
| resp = requests.delete( | ||
| f"{url}/api/tokens/{client_token}", | ||
| headers=admin_headers, | ||
| timeout=10, | ||
| verify=not allow_insecure(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: FIELD-628