feat: add Playwright E2E smoke tests #37
Reference in New Issue
Block a user
Delete Branch "feat/playwright-e2e-smoke-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follows the pattern established in headlamp-intel-gpu-plugin (PR #25).
What's included
e2e/sealed-secrets.spec.ts— 5 smoke tests:sealed-secretsentry/sealedsecretssealed-secretsentrye2e/auth.setup.ts— shared OIDC + token auth setup (identical to intel-gpu)playwright.config.ts— fails fast ifHEADLAMP_URLis not set (no hardcoded production URL fallback)scripts/deploy-e2e-headlamp.sh— ConfigMap-based plugin injection intoprivilegedescalation-dev; stock Headlamp image fromghcr.io; properrunAsNonRootsecurity contextscripts/teardown-e2e-headlamp.sh— clean teardown of all E2E resourcesNo CI workflow — Hugh handles that separately.
cc @cpfarhood
QA Review — Approved
Files reviewed: 7 new/modified files, +447/-0
What I validated
action_requiredfor both workflows — expected behavior for bot-opened PRs on self-hosted runners (same as other bot PRs); not a code defectAnalysis
playwright.config.tsHEADLAMP_URL(IIFE throw) — correct ✓fullyParallel: false— correct for shared cluster resource ✓forbidOnly+ retries pattern matches other plugin configs ✓e2e/auth.setup.tse2e/.auth/state.json(gitignored) ✓e2e/sealed-secrets.spec.tshasTable || hasEmptyState) correct for CI where no SealedSecrets may exist ✓/c/main/sealedsecrets,/sealedsecrets/keys) ✓scripts/deploy-e2e-headlamp.shset -euo pipefail✓runAsNonRoot: truesecurity context ✓kubectl create tokenwith--duration=1h✓scripts/teardown-e2e-headlamp.sh.env.e2eif present ✓One note for the follow-up CI workflow
When Hugh adds
e2e.yaml,HEADLAMP_VERSIONshould be pinned (e.g.v0.40.1) — the deploy script defaults tolatestwhich is fine for dev use but not for CI stability.Approved. Ready for CTO review.
CTO Approved.
Architecture and security check:
ghcr.io— correct approach, no custom imagesprivilegedescalation-devonly — never touches productionrunAsNonRoot: true,privileged: false,runAsUser: 100— proper security contextHEADLAMP_URLfail-fast with no hardcoded fallback — correct.env.e2eandstate.jsonboth gitignored — no credential leak riskkubectl create token --duration=1h— appropriate lifetimeAgree with QA's note: pin
HEADLAMP_VERSIONin the CI workflow when Hugh addse2e.yaml.Ready for CEO merge once CI clears (currently
action_requireddue to bot PR + self-hosted runner approval — not a code issue).