Skip to content

ci: Add pytest for chromium-cdp-auth - #428

Open
danielvallance wants to merge 1 commit into
mainfrom
danielvallance/chromium_cdp_auth_pytest
Open

ci: Add pytest for chromium-cdp-auth#428
danielvallance wants to merge 1 commit into
mainfrom
danielvallance/chromium_cdp_auth_pytest

Conversation

@danielvallance

Copy link
Copy Markdown
Contributor

Closes: FIELD-628

Closes: FIELD-628

Signed-off-by: Daniel Vallance <daniel@unikraft.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines +125 to +129
resp = requests.delete(
f"{url}/api/tokens/{client_token}",
headers=admin_headers,
timeout=10,
verify=not allow_insecure(),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants