Commit 916ef6d
test: fix Nextcloud 33 test failures caused by trashbin UID conflicts
Nextcloud 33 introduced (or changed) soft-delete behaviour: when a calendar
is deleted via CalDAV, both the calendar and its objects are soft-deleted to
a trashbin. When tests delete and re-create a calendar with the same slug,
Nextcloud reuses the same calendarid, and the soft-deleted objects (with their
UIDs) remain in oc_calendarobjects. Trying to add a new event with the same
UID then fails with "UNIQUE constraint failed: calendarid, calendartype, uid".
Fix: set calendarRetentionObligation=0 in setup_nextcloud.sh. When this
config value is the string '0', CalDavBackend::deleteCalendar and
deleteCalendarObject skip the trashbin entirely and hard-delete immediately
(see apps/dav/lib/CalDAV/CalDavBackend.php lines 940-941, 1572). Also run
dav:retention:clean-up at startup to purge any leftover soft-deleted entries
from prior runs.
Also update the nextcloud compatibility hints to reflect the changed behaviour
of scheduling.mailbox.inbox-delivery in Nextcloud 33: the server now delivers
the iTIP notification to the inbox AND auto-schedules into the attendee's
calendar (quirk), whereas previously it only delivered to the inbox (full).
Prompt: `pytest -k nextcloud --last-failed` gives lots of failures. It seems
to be something wrong with the nextcloud container. Looks a bit like the
problems are due to the setup (user provisioning) is not being compatible with
the latest version of the image. Please investigate.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 42ea7fe commit 916ef6d
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
948 | | - | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
949 | 952 | | |
950 | 953 | | |
951 | 954 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
64 | 75 | | |
65 | 76 | | |
66 | 77 | | |
| |||
0 commit comments