Stefan Lohmaier
85f5e26384
test: Edge-Case-Dateien + Tests (leer/gross/verschluesselt/Sonderzeichen)
...
/testdata/edge/: empty.txt, leer.bin (0 Byte), Name mit Umlauten+Leerzeichen+
Klammern, Unicode/Emoji/RTL-Inhalt, Datei ohne Endung, passwortgeschuetztes
PDF (pikepdf) + ZIP, riesig.dat (26 MB > MAX_BIN_SIZE). TestFileEdgeCases prueft
graceful Handling (kein Crash, 'Datei zu gross', PDF-Lesefehler sauber gemeldet).
gen_edge.py + upload_ocis.sh erweitert. 76 Tests gruen.
2026-06-19 08:05:25 +02:00
Stefan Lohmaier
5f3181b162
test: umfangreiche Testdaten (alle Dateitypen + Mail-Anhaenge)
...
- oCIS /testdata/: Bilder (jpg/png/webp/bmp/gif/tiff/svg), Audio (mp3/ogg/m4a/
flac/wav), Video (mp4), PDFs (Text + Scan), Office (docx/xlsx/pptx), Text/Daten
(md/txt/csv/json/xml/yaml/html/py/vcf/ics), Archive (zip/tar.gz).
- Maildir: Mails mit diversen Anhaengen (PDF/Bild/Word/Excel/MP3/MP4/PPTX/ZIP).
- TestFileTypes: read_file je Typ -> Content-Typ pruefen (image/text/resource).
- Generatoren tests/testdata/gen_testfiles.py + gen_maildir.py + upload_ocis.sh.
68 Tests gruen (vorher 54). Doku in MCPTEST.md.
2026-06-19 07:56:08 +02:00
Stefan Lohmaier
0a1576aaa5
test: dedizierter mcptest-User statt Stefans echter Daten
...
USER_ALIASES test->mcptest. Eigene Backends pro Dienst:
- Radicale-User mcptest + /mcptest/calendar-test + contacts-test
- oCIS-User mcptest (Graph-API), Joplin lokales Profil :41186
- statische Test-Maildir tests/testdata/maildir (mcp-test-mail/-empty)
test_all.py auf mcptest-Backends umgestellt (Account-/Kalender-/Kontaktnamen).
config.json (gitignored) mit mcptest in allen Maps. Doku: tests/MCPTEST.md.
54 Tests gruen. Stefans calendar-test/contacts-test + Joplin-Test-Reste entfernt.
2026-06-19 07:46:35 +02:00
Stefan Lohmaier
b555a2e19d
security: redirect_uri-Allowlist + mail Path-Traversal-Schutz
...
- common.py /authorize: redirect_uri muss https://claude.ai/ oder https://claude.com/ sein
(verhindert offenen Redirect / Code-Abfluss an fremde URIs).
- mail/server.py _open_folder: realpath-Check, Ordner muss im Account-Verzeichnis
bleiben (Path-Traversal verhindert).
- tests: get_token_pkce auf sicheren Flow aktualisiert (erlaubte redirect_uri +
client_secret). 54/54 Tests gruen.
test-Client bleibt (Test-Suite braucht ihn, Secret 600-geschuetzt).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-18 10:09:23 +02:00
Stefan Lohmaier
c06e6d6b4c
Joplin via Data API + Mail attachments
...
Notes server rewritten to use Joplin CLI Data API (joplin-cli sync
clients on host, ports 41184/41185). Clean fast search, proper
resource handling. New tools: list_note_resources, read_resource
(attachments as inline image/document/text).
Mail server: read_mail now lists attachments; new read_attachment
tool returns images inline, PDFs/docs as EmbeddedResource, text directly.
Tests: 54 total. Notes now real (notebooks, list, create+read).
Mail attachment listing + fetch tested.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-06-12 12:26:26 +02:00
Stefan Lohmaier
38cf147eec
Fix Files tests: isolated test dir, auto-create and cleanup
...
Tests create /.mcp-tests/ in oCIS at start, delete at end.
No interference with user's real files. Fixed for stefan's
actual oCIS account (was using admin before).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-06-12 10:51:58 +02:00
Stefan Lohmaier
e721250552
Expand test suite to 51 tests with full CRUD coverage
...
Test collections: calendar-test, contacts-test, /mcp-tests/
- OAuth: 30 tests (metadata, credentials, PKCE, rejection, tools list × 5 servers)
- Mail: 5 tests (accounts, folders, search, empty search, read full mail)
- Calendar: 5 tests (list, tasks, create event + verify, create task + verify, date range)
- Contacts: 4 tests (search, empty, create + verify, get details)
- Files: 6 tests (list, info, write+read+delete, create+delete folder, move, search)
- Notes: 1 test (list notebooks)
All tests create unique timestamped data and clean up after themselves.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-06-12 10:36:29 +02:00
Stefan Lohmaier
2618ecfc86
Add test client and automated integration test suite
...
- 'test' OAuth client maps to stefan's data via USER_ALIASES
- 38 tests covering OAuth (metadata, client_credentials, PKCE, invalid
secret, no auth), Mail (accounts, folders, search), Calendar
(calendars, tasks, events, search), Contacts (search, empty),
Files (list, info), Notes (notebooks)
- Daily systemd timer (05:00) with NTFY notification on failure
- Shared token store (.active_tokens.json) for cross-process auth
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-06-12 10:33:01 +02:00