Skip to content

Commit 33a692e

Browse files
tobixenclaude
andcommitted
ci: fix scheduling tests in GitHub CI for Nextcloud and Cyrus
Nextcloud: add email addresses for scheduling test users (user1-user3). Without email addresses, calendar-user-address-set lacks the mailto: entry required for iTIP invite delivery to work via CalDAV. Cyrus: copy imapd.conf with virtdomains: off before waiting for CalDAV. The default virtdomains: userid causes caladdress_lookup() to retain the full email form (user2@example.com) as the userid, but mailbox ACLs use the short form (user2), causing 403 when delivering iTIP invites. The local docker-compose setup mounts the custom imapd.conf at startup; in CI we copy it to the running service container and restart it. Also fix two test failures unrelated to scheduling: Nextcloud cleanup-regime: calendar deletion goes to a trashbin, so delete-and-recreate does not produce a fresh empty calendar. Use "cleanup-regime: wipe-calendar" to wipe objects instead. Cyrus testRecurringDateWithExceptionSearch: Cyrus stores exception VEVENTs as separate calendar object resources, so client-side expansion cannot produce correct RECURRENCE-ID values. Mark the feature unsupported and gate the assertion on it. prompt: fix the github ci failures for scheduling tests (nextcloud email addresses for scheduling users, cyrus virtdomains setting); commit all pending changes together Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 04f4072 commit 33a692e

3 files changed

Lines changed: 30 additions & 2 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ jobs:
154154
docker exec -e OC_PASS="testpass${i}" ${{ job.services.nextcloud.id }} php occ user:add --password-from-env --display-name="User ${i}" "user${i}" || echo "user${i} may already exist"
155155
done
156156
157+
# Set email addresses for scheduling users (required for calendar-user-address-set)
158+
for i in 1 2 3; do
159+
docker exec ${{ job.services.nextcloud.id }} php occ user:setting "user${i}" settings email "user${i}@localhost" || true
160+
done
161+
157162
# Enable calendar and contacts apps
158163
docker exec ${{ job.services.nextcloud.id }} php occ app:enable calendar || true
159164
docker exec ${{ job.services.nextcloud.id }} php occ app:enable contacts || true
@@ -180,6 +185,17 @@ jobs:
180185
" || true
181186
182187
echo "Nextcloud is configured!"
188+
- name: Configure Cyrus
189+
run: |
190+
# Copy imapd.conf with virtdomains: off (required for iTIP scheduling delivery).
191+
# The default virtdomains: userid setting causes caladdress_lookup() to preserve
192+
# the full email form (user2@example.com) while mailbox ACLs use the short form
193+
# (user2), resulting in 403 errors when delivering iTIP invites.
194+
sed 's/{{DEFAULTDOMAIN}}/example.com/g; s/{{SERVERNAME}}/cyrus-test/g' \
195+
tests/docker-test-servers/cyrus/imapd.conf > /tmp/imapd_expanded.conf
196+
docker cp /tmp/imapd_expanded.conf ${{ job.services.cyrus.id }}:/srv/cyrus-docker-test-server.git/imapd.conf
197+
docker restart ${{ job.services.cyrus.id }}
198+
echo "✓ Cyrus reconfigured with virtdomains: off"
183199
- name: Wait for Cyrus to be ready
184200
run: |
185201
echo "Waiting for Cyrus server..."

caldav/compatibility_hints.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,9 @@ def dotted_feature_set_list(self, compact=False):
959959
'behaviour': "deleting a calendar moves it to a trashbin, thrashbin has to be manually 'emptied' from the web-ui before the namespace is freed up",
960960
'support': 'fragile',
961961
},
962+
# Calendar deletion goes to trashbin so delete-and-recreate doesn't give a
963+
# fresh empty calendar. Wipe objects instead of deleting the calendar itself.
964+
"test-calendar": {"cleanup-regime": "wipe-calendar"},
962965
'search.recurrences.includes-implicit.todo': {'support': 'unsupported'},
963966
#'save-load.todo.mixed-calendar': {'support': 'unsupported'}, ## Why? It started complaining about this just recently.
964967
'principal-search.by-name.self': {'support': 'unsupported'},
@@ -1145,7 +1148,11 @@ def dotted_feature_set_list(self, compact=False):
11451148
# Cyrus changes the Schedule-Tag even on attendee PARTSTAT-only updates,
11461149
# violating RFC6638 section 3.2 which requires the tag to remain stable.
11471150
"scheduling.schedule-tag.stable-partstat": {"support": "unsupported"},
1148-
# Cyrus may not properly reject wrong passwords in some configurations
1151+
# Cyrus splits exception VEVENTs (with RECURRENCE-ID) into separate calendar
1152+
# object resources rather than keeping master+exception together. Client-side
1153+
# expansion therefore cannot produce correct RECURRENCE-ID values.
1154+
"save-load.event.recurrences.exception": {"support": "unsupported"},
1155+
# Cyrus may not properly reject wrong passwords in some configurations.
11491156
# Cyrus implements server-side automatic scheduling: for cross-user invites,
11501157
# the server both auto-processes the invite into the attendee's calendar
11511158
# AND delivers an iTIP notification copy to the attendee's schedule-inbox.

tests/test_caldav.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3969,7 +3969,12 @@ def testRecurringDateWithExceptionSearch(self):
39693969
):
39703970
assert len(rs) == 2
39713971

3972-
asserts_on_results = [r]
3972+
asserts_on_results = []
3973+
# Client-side expansion only produces correct RECURRENCE-IDs when the
3974+
# server keeps master VEVENT + exception VEVENT in the same calendar
3975+
# object resource. If the server splits them, skip this assertion.
3976+
if self.is_supported("save-load.event.recurrences.exception"):
3977+
asserts_on_results.append(r)
39733978
if self.is_supported("search.recurrences.expanded.exception"):
39743979
asserts_on_results.append(rs)
39753980

0 commit comments

Comments
 (0)