Skip to content

test: smoke-test unreadable address books and cards under foreign filenames - #8

Merged
dominik1001 merged 2 commits into
mainfrom
test/smoke-error-and-fallback
Nov 18, 2026
Merged

dominik1001 merged 2 commits into
mainfrom
test/smoke-error-and-fallback

Conversation

@dominik1001

@dominik1001 dominik1001 commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Adds two end-to-end checks to scripts/smoke.ts. CI already runs it against Radicale on every PR.

1. A missing address book must produce an error, not an empty list.
list-contacts is called with a URL that doesn't exist, and the test asserts isError. Returning [] would tell the agent the address book has no contacts. #3 regresses exactly this: a PROPFIND 404 gets filtered out like the collection's own entry, so the tool returns []. This check catches it.

2. Cards that aren't stored as <uid>.vcf.
The smoke test only ever created cards through create-contact, so resolveContact's fallback scan never ran end to end. The test now writes a card under an unrelated filename with a plain HTTP PUT, as another client would. It then runs get-contact, update-contact and delete-contact on it by uid. After the update it checks that the change landed on the card's own href and not in a new <uid>.vcf. If a step fails, the seeded card is removed so no test data is left behind.

Verification

  • npm run validate passes.
  • CI (Node 22) smoke job passes. The first push used tsdav to seed the card and failed under tsx on Node 22 with tsdav does not provide an export named 'DAVClient', so the script now uses plain fetch.
  • The new smoke test against a local Radicale:
  • Not run against the production .env server or smoke:agent: no .env was available in this checkout.

🤖 Generated with Claude Code

dominik1001 and others added 2 commits November 18, 2026 10:41
…enames

list-contacts must report an error when the address book cannot be read,
not an empty list that tells the agent there are no contacts. PR #3 would
have regressed this without any test noticing.

Cards written by other clients need not live at <uid>.vcf. Seed one under
an unrelated filename over CardDAV and drive get/update/delete by uid, so
resolveContact's address-book scan runs end to end and updates are checked
to land on the card's own href.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under tsx on Node 22 (CI), importing tsdav's named exports from the smoke
script fails: "The requested module 'tsdav' does not provide an export
named 'DAVClient'". The seed only needs PUT, GET and DELETE, so plain fetch
with Basic auth does it without depending on how tsx loads tsdav's bundle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dominik1001
dominik1001 merged commit 33f2324 into main Nov 18, 2026
10 checks passed
@dominik1001
dominik1001 deleted the test/smoke-error-and-fallback branch November 18, 2026 09:50
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.

1 participant