[PR #2412] [MERGED] test(caldav): add comprehensive CalDAV protocol e2e test suite #8245

Closed
opened 2026-04-20 18:06:42 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2412
Author: @tink-bot
Created: 3/18/2026
Status: ✅ Merged
Merged: 4/2/2026
Merged by: @kolaente

Base: main ← Head: feat-caldav-e2e-tests


📝 Commits (10+)

  • 1c2b5d8 test(caldav): add caldavtests package with infrastructure, helpers, and mage target
  • 5263317 test(caldav): add PROPFIND tests (RFC 4918 §9.1)
  • acd92b3 test(caldav): add discovery flow tests (RFC 6764, RFC 5397, RFC 4791)
  • 7bfe770 test(caldav): add REPORT query tests (RFC 4791 §7.8, §7.9)
  • 7263084 test(caldav): add CRUD operation tests (RFC 4791 §5.3.2)
  • 4babf77 test(caldav): add authentication and permission tests
  • 18900e8 test(caldav): add sync semantics tests (ETag, CTag, conditional requests)
  • e7d17f8 test(caldav): add client compatibility and bug reproduction tests
  • d47dc04 test(caldav): add relation and subtask tests (RFC 5545 §3.8.4.5)
  • 96fd546 test(caldav): add VTODO field round-trip tests (RFC 5545 §3.6.2)

📊 Changes

18 files changed (+3171 additions, -11 deletions)

View changed files

📝 .github/workflows/test.yml (+42 -10)
📝 magefile.go (+8 -1)
➕ pkg/caldavtests/auth_test.go (+182 -0)
➕ pkg/caldavtests/bugs_test.go (+51 -0)
➕ pkg/caldavtests/client_compat_test.go (+215 -0)
➕ pkg/caldavtests/crud_test.go (+358 -0)
➕ pkg/caldavtests/discovery_test.go (+284 -0)
➕ pkg/caldavtests/integrations.go (+146 -0)
➕ pkg/caldavtests/main_test.go (+32 -0)
➕ pkg/caldavtests/propfind_bodies.go (+107 -0)
➕ pkg/caldavtests/propfind_test.go (+240 -0)
➕ pkg/caldavtests/relations_test.go (+235 -0)
➕ pkg/caldavtests/report_test.go (+234 -0)
➕ pkg/caldavtests/smoke_test.go (+36 -0)
➕ pkg/caldavtests/sync_test.go (+259 -0)
➕ pkg/caldavtests/vtodo_builder.go (+203 -0)
➕ pkg/caldavtests/vtodo_roundtrip_test.go (+400 -0)
➕ pkg/caldavtests/xml_helpers.go (+139 -0)

📄 Description

Adds a new pkg/caldavtests/ package with 124 test cases that exercise the CalDAV implementation through the full HTTP router (e.ServeHTTP), documenting current behavior and providing a regression harness for future fixes.

107 tests pass, 17 fail — failures are expected and document implementation gaps (e.g., missing conditional GET support, RRULE not preserved on export, PROPFIND on individual resources missing ETag/calendar-data).

What's covered

  • Infrastructure: Test setup, HTTP helpers, XML/iCal parsers, VTodo builder, mage test:caldav command, CI matrix entry
  • Discovery (RFC 6764, 5397, 4791): .well-known/caldav, principal, calendar-home-set, OPTIONS, full chain
  • PROPFIND (RFC 4918): Depth 0/1 on collections and resources, ETags, access control
  • CRUD (RFC 4791): PUT create/update, GET, DELETE, full lifecycle
  • VTODO round-trip (RFC 5545): Every supported property (summary, description, due, priority, categories, alarms, rrule, color, duration)
  • REPORT (RFC 4791): calendar-query, calendar-multiget, ETag consistency
  • Auth & permissions: Basic auth, wrong credentials, unauthorized access
  • Sync semantics: ETag stability, CTag changes, If-Match/If-None-Match
  • Relations (RFC 5545): Parent/child, reverse-order import, cross-project, deletion cascading, re-sync preservation
  • Client compatibility: DAVx5, Thunderbird, Tasks.org flow simulations
  • Bug template: Ready-to-use pattern for reproducing reported issues

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/2412 **Author:** [@tink-bot](https://github.com/tink-bot) **Created:** 3/18/2026 **Status:** ✅ Merged **Merged:** 4/2/2026 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `feat-caldav-e2e-tests` --- ### 📝 Commits (10+) - [`1c2b5d8`](https://github.com/go-vikunja/vikunja/commit/1c2b5d8c5febc963019ba9e346386b3faa3acaa4) test(caldav): add caldavtests package with infrastructure, helpers, and mage target - [`5263317`](https://github.com/go-vikunja/vikunja/commit/52633174b198e48b0905db3c4e60219e183c1852) test(caldav): add PROPFIND tests (RFC 4918 §9.1) - [`acd92b3`](https://github.com/go-vikunja/vikunja/commit/acd92b3facb111d6b89cd7f046ecb0f0cd46a4d2) test(caldav): add discovery flow tests (RFC 6764, RFC 5397, RFC 4791) - [`7bfe770`](https://github.com/go-vikunja/vikunja/commit/7bfe770c0380f7bb6b534ea80ff84193aec52ef6) test(caldav): add REPORT query tests (RFC 4791 §7.8, §7.9) - [`7263084`](https://github.com/go-vikunja/vikunja/commit/7263084d61b253a07f12539a567b052031e4fa02) test(caldav): add CRUD operation tests (RFC 4791 §5.3.2) - [`4babf77`](https://github.com/go-vikunja/vikunja/commit/4babf77cab7690be70c739c6599deee7d5864b39) test(caldav): add authentication and permission tests - [`18900e8`](https://github.com/go-vikunja/vikunja/commit/18900e83ec61fe6f2a3725f2c9add36483ef11b8) test(caldav): add sync semantics tests (ETag, CTag, conditional requests) - [`e7d17f8`](https://github.com/go-vikunja/vikunja/commit/e7d17f88533eda2ed7e49f674f277e2a463d3bc1) test(caldav): add client compatibility and bug reproduction tests - [`d47dc04`](https://github.com/go-vikunja/vikunja/commit/d47dc04ea342930b404d821225f194ac03cfe5fd) test(caldav): add relation and subtask tests (RFC 5545 §3.8.4.5) - [`96fd546`](https://github.com/go-vikunja/vikunja/commit/96fd5467a7169409b4379c706f307800252322b2) test(caldav): add VTODO field round-trip tests (RFC 5545 §3.6.2) ### 📊 Changes **18 files changed** (+3171 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test.yml` (+42 -10) 📝 `magefile.go` (+8 -1) ➕ `pkg/caldavtests/auth_test.go` (+182 -0) ➕ `pkg/caldavtests/bugs_test.go` (+51 -0) ➕ `pkg/caldavtests/client_compat_test.go` (+215 -0) ➕ `pkg/caldavtests/crud_test.go` (+358 -0) ➕ `pkg/caldavtests/discovery_test.go` (+284 -0) ➕ `pkg/caldavtests/integrations.go` (+146 -0) ➕ `pkg/caldavtests/main_test.go` (+32 -0) ➕ `pkg/caldavtests/propfind_bodies.go` (+107 -0) ➕ `pkg/caldavtests/propfind_test.go` (+240 -0) ➕ `pkg/caldavtests/relations_test.go` (+235 -0) ➕ `pkg/caldavtests/report_test.go` (+234 -0) ➕ `pkg/caldavtests/smoke_test.go` (+36 -0) ➕ `pkg/caldavtests/sync_test.go` (+259 -0) ➕ `pkg/caldavtests/vtodo_builder.go` (+203 -0) ➕ `pkg/caldavtests/vtodo_roundtrip_test.go` (+400 -0) ➕ `pkg/caldavtests/xml_helpers.go` (+139 -0) </details> ### 📄 Description Adds a new `pkg/caldavtests/` package with 124 test cases that exercise the CalDAV implementation through the full HTTP router (`e.ServeHTTP`), documenting current behavior and providing a regression harness for future fixes. **107 tests pass, 17 fail** — failures are expected and document implementation gaps (e.g., missing conditional GET support, RRULE not preserved on export, PROPFIND on individual resources missing ETag/calendar-data). ## What's covered - **Infrastructure**: Test setup, HTTP helpers, XML/iCal parsers, VTodo builder, `mage test:caldav` command, CI matrix entry - **Discovery** (RFC 6764, 5397, 4791): `.well-known/caldav`, principal, calendar-home-set, OPTIONS, full chain - **PROPFIND** (RFC 4918): Depth 0/1 on collections and resources, ETags, access control - **CRUD** (RFC 4791): PUT create/update, GET, DELETE, full lifecycle - **VTODO round-trip** (RFC 5545): Every supported property (summary, description, due, priority, categories, alarms, rrule, color, duration) - **REPORT** (RFC 4791): calendar-query, calendar-multiget, ETag consistency - **Auth & permissions**: Basic auth, wrong credentials, unauthorized access - **Sync semantics**: ETag stability, CTag changes, If-Match/If-None-Match - **Relations** (RFC 5545): Parent/child, reverse-order import, cross-project, deletion cascading, re-sync preservation - **Client compatibility**: DAVx5, Thunderbird, Tasks.org flow simulations - **Bug template**: Ready-to-use pattern for reproducing reported issues --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 18:06:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#8245