You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(login): cover guest valid-key claim and stale-key guest credentials
Add unit test for guest profile with valid key reaching signup claim flow.
Update guest acceptance test to assert guest_user_id/guest_api_key on POST
after validate 401 without auth_intent.
Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: test/acceptance/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ These tests run automatically in CI using API keys from `hookdeck ci`. They don'
13
13
14
14
**Login recovery (mock API, `basic` tag):**`login_auth_acceptance_test.go` runs the real CLI with `--api-base` pointing at a local server that returns **401** on `GET .../cli-auth/validate`, then completes a fake device-auth poll — this asserts `hookdeck login` continues into browser/device flow after a stale key (no human, no real Hookdeck key). The same file includes **`TestCIFailsFastWithInvalidAPIKeyAcceptance`**, which runs `hookdeck ci --api-key` with a bogus key against the real API and expects a quick failure with the friendly **Authentication failed** message, and asserts output does **not** contain browser/device-login phrases (`Press Enter to open the browser`, `To authenticate with Hookdeck`, etc.) so CI never enters the interactive `hookdeck login` flow.
15
15
16
-
**Guest login intents (mock API, `guest` tag):**`guest_login_acceptance_test.go` asserts `POST /cli-auth` receives `claim_guest` with guest credentials when a guest profile is present, and `login` without guest credentials after logout (empty profile).
16
+
**Guest login (mock API, `guest` tag):**`guest_login_acceptance_test.go` asserts `POST /cli-auth` receives guest credentials when a guest profile is present, and omits them after logout (empty profile).
17
17
18
18
### 2. Manual Tests (Require Human Interaction)
19
19
These tests require browser-based authentication via `hookdeck login` and must be run manually by developers.
0 commit comments