677 Commits

Author SHA1 Message Date
Jamie McClymont
e449529f34 Fix tests after freebusy query changes
The todo item added in 0514-iCal-PUT-VTODO.test was apparently not picked up by
the PL/pgSQL functions, which as far as I can tell is an error, since the event
is in the 2006-2007 range covered by the query. The new
first_instance_start/last_instance_end method for determining freebusy
information now allows the todo to appear in freebusy.
2019-01-03 17:48:43 +13:00
Jamie McClymont
cf7de16e59 Handle default timezones in getVCalendarRange
Also includes some PHPUnit-based tests for this function!
2019-01-03 17:48:42 +13:00
Jamie McClymont
0c006b5c7c Make the recurrence range columns in the database tz-aware 2019-01-03 16:04:28 +13:00
Florian Schlichting
7330eaf995 checkpoint scheduling test results and add them to CI runner (fixes: #170)
I think these remaining changes are due to AWLs vCalendar->GetItip()
creating a "minimal iTIP version" of events, and Jan Mate's "various
scheduling related fixes" in 31af435c and 92f48f38
2018-12-31 03:34:37 +01:00
Florian Schlichting
df13612a68 mask unstable DTSTAMP in scheduling tests
It is reset to the current date in AWL's vCalendar->GetItip()
2018-12-31 03:23:08 +01:00
Florian Schlichting
9e8c3c47c4 Test: max-resource-size is no longer infinity
c5891abc7f brought back a new, higher limit, which is configurable by
the site admin.
2018-12-22 00:18:27 +01:00
Florian Schlichting
1301b2c494 Apache 2.4.35 stops sending Content-Type headers for 204 No Content responses
Normalize results so tests work with newer and older versions

This change is similar to e565cc0a5e4af0330fe5a1ab6f2476be7fb10df4 and
following

From the Apache 2.4.35 changelog:

  *) http: Enforce consistently no response body with both 204 and 304
     statuses.  [Yann Ylavic]
2018-12-22 00:12:54 +01:00
Jamie McClymont
a4c9718bb2 Add Gitlab CI
Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
2018-11-30 15:59:04 +13:00
Jamie McClymont
0e0a07eb30 Fix returning dead properties in an allprop PROPFIND
dead_properties is an assoc.array from name to value, but it was being merged
with simple arrays of property names.

This means that tests 0824 and 0828 now actually return the dead properties, so
I've updated those result files.

Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
2018-11-30 15:59:04 +13:00
Andrew Ruthven
8c01c83e4b Ignore the id in our test comparision
Gitlab CI has a different collection_id for US Holidays than running
the tests locally. We don't actually care about ID for this test,
just the fact that the binding is present is enough for us.
2018-11-30 15:02:53 +13:00
Andrew Ruthven
0c074e4348 Explicitly set the Charset to use, and look for the usual format.
In the GitLab CI environment, the command:

@header("Content-Type: text/plain");

Generates the Content-Type line of:

Content-Type: text/plain; charset=UTF-8

But on my workstation it generates this:

Content-Type: text/plain;charset=UTF-8

By adding that charset to our call to @header, we receive a
predictable result.
2018-11-29 13:40:12 +13:00
Andrew Ruthven
9d2969982c Exclude the ctags from the test
We don't really care about the ctag in this test, and the ctag
for user1 will change from test run to test run.
2018-11-29 13:24:25 +13:00
Andrew Ruthven
46c76c645f Atually, options aren't supported on the end of REPLACE 2018-11-29 13:20:44 +13:00
Andrew Ruthven
bdc480b785 Merge branch 'freebusy-no-ci' into 'master'
Correctly place floating events in freebusy

Closes #169 and #146

See merge request davical-project/davical!57
2018-11-13 22:19:49 +00:00
Andrew Ruthven
12565cb6bd Make the tests more interesting by using ctag 2018-11-12 20:14:40 +13:00
Andrew Ruthven
deb743fdcf Add tests for: Fix Fatal PHP Error if Depth is more than 1.
I'm not 100% this is working as intended, but it does kind
of make sense.
2018-11-12 20:00:20 +13:00
Andrew Ruthven
872f4fc6ad Allow over riding the value of ALLSUITES 2018-11-12 18:33:01 +13:00
Andrew Ruthven
a394c73cc4 This looks like an acceptable change 2018-11-12 18:31:28 +13:00
Andrew Ruthven
95ad5ec373 Allow database dumps to be restored in test suite.
Primary fix is the search_path to ensure that the collection table
is in the search path so that the copy into dav_binding (and
possibly others) will work.

I also suppressed the warning about plpgsql.
2018-11-12 18:00:30 +13:00
Andrew Ruthven
b0a1c9212d Ignore the PostgreSQL version for tests
This just creates bogus test result diffs.
2018-11-12 17:59:51 +13:00
Jamie McClymont
ec67b28bf0 Guess the timezone of non-all-day floating events in freebusy
Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
2018-11-09 15:41:02 +13:00
Jamie McClymont
91aaf48648 Guess the timezone of VALUE=DATE events in freebusy
Resolves #146
2018-10-31 12:09:45 +13:00
Andrew Ruthven
bc61d51f5b Test that max-resource-size is infinity.
Commit 9a430130d84e9512ebaecdb02d634c367b63de46 removed the limit,
update the regression tests to reflect this.
2018-10-02 19:55:25 +13:00
Frank Steinberg
9363a3d19a Improved handling of event modifications:
- only some event attributes modified by the organizer get also modified in attendees' instances of the event,
- revoked invitations mark the according attendee's event appropriately,
- a changed event time resets all attendees' PARTSTAT to NEEDS-ACTION.
2018-01-11 23:08:17 +01:00
Florian Schlichting
4e5d3ceda4 update unit test due to previous commit 2018-01-11 22:13:07 +01:00
Florian Schlichting
bc9c39c455 add regression tests for iCal handling calendar delegations 2018-01-09 23:11:04 +01:00
Florian Schlichting
4335e790d1 drop tests/regression-suite/0528, same as 0527 2018-01-09 22:15:29 +01:00
Florian Schlichting
17c2022122 group-member-set and group-membership queries on proxy resources should be handled in DAVResource
Otherwise we cannot be sure if the resource we are looking at is a
proxy. Looking at the request as we did in DAVPrincipal is wrong, as one
request can result in several resources to be examined, only some of
which may be proxies.

BTW looking at the regression test changes, I'm not sure having
calendar-proxy-read-for on proxy principals is correct, but caldav-proxy
seems to have nothing to say on that so we leave it for now.
2018-01-09 22:11:30 +01:00
Florian Schlichting
6687bdcf03 update regression tests due to FetchProxyGroups changes 2018-01-09 01:30:38 +01:00
Florian Schlichting
a7ba436f2f advertise support for principal-match REPORT
and a few more bits inspired by CalDAV/aclreports.xml:
    - strict Depth header checking
    - principal-match: match on dav_name if not $match_self
    - principal-match can "alternatively" return resources in a collection
      that belong to a principal, like a user's calendars when we query
      the principal URI
2018-01-08 22:51:22 +01:00
Florian Schlichting
5dc4aed87c testsuite: support /principals/users/ and similar special URLs 2017-10-04 23:28:03 +02:00
Florian Schlichting
8d1a4dba0f testsuite: update for calendar-user-type support 2017-10-04 23:28:03 +02:00
Florian Schlichting
2ed5edaf5a Update scheduling test-suite: consistent linebreaks, unnecessary quoting, etags 2017-10-04 23:28:03 +02:00
Florian Schlichting
50dd8a8d73 fix confusing comments 2017-10-04 23:28:03 +02:00
Florian Schlichting
39001794a3 Update caldav_functions.sql for Postgresql 10
From version 10, Postgresql does not allow set-returning functions in
CASE statements. As we're using the functions recursively, we cannot
use LATERAL as suggested in the error message, but we can switch the
condition inside-out with only a limited amount of repetition.
2017-10-04 22:36:29 +02:00
Florian Schlichting
44ff0b3286 update tests for changed etags, unstable REV/UID or sort order, improved property parsing
Changed line wrapping in awl is one major reason for etag changes.

With this commit, all tests in regression-suite, binding and carddav
pass for me, using the configuration outlined in README.regression_tests
2017-09-21 00:39:30 +02:00
Florian Schlichting
0cab01f390 dav_test: all files and I/O are UTF-8 2017-09-21 00:39:24 +02:00
Florian Schlichting
7e3a9a476f group memberships for the calendar-proxy-{read,write} pseudo-principal are always empty
Only regular principals can be members in any groups, for
pseudo-principals group membership doesn't make sense. In case somebody
asks, do not return the group memberships of the parent principal but
rather provide an empty answer.
2017-09-19 21:22:58 +02:00
Florian Schlichting
a6b286ab98 caldav-proxy 5.2: calendar-proxy-read/write are themselves principal resources
Fixes the CalDAV/calendaruserproxy.xml test.
2017-09-19 21:19:02 +02:00
Florian Schlichting
63c4de9f34 do not advertise ?add_member on a principal
We wouldn't know what to do with that anyway...

Fixes the CalDAV/add-member.xml test.
2017-09-19 21:16:43 +02:00
Florian Schlichting
74828c8c60 Update testsuite for changes related to #112 (4cf6628) 2017-04-07 14:17:00 +02:00
Florian Schlichting
dc9edfcfda Update regression suite for gratuitous whitespace changes 2017-01-17 23:40:54 +01:00
Florian Schlichting
727fe290b4 make clean should also clean regression testing artefacts 2017-01-10 22:14:36 +01:00
Florian Schlichting
202542dc1b updates for bulk addressbook import 2017-01-07 02:17:29 +01:00
Florian Schlichting
f8ee381840 Add a test case for /user/calendar-proxy-read/ with return=minimal
and update 0525-iCal-PROPFIND now that we return a result for proxy
group-member-set
2017-01-04 22:32:58 +01:00
Florian Schlichting
10ed3ffc84 misc changes to get more tests to pass
Status: binding almost passes, carddav and scheduling have some issues,
timezone seems hopeless (dependency on remote URL that is 404)
2017-01-01 20:46:36 +01:00
Florian Schlichting
4ef5730bef Restore-Database.result: error setting plpgsql COMMENT and lots more setval in dump 2017-01-01 20:46:36 +01:00
Florian Schlichting
fa2517b983 Update other testsuites for contenttype, PROPPATCH and 204 No Content changes 2017-01-01 20:46:31 +01:00
Florian Schlichting
e565cc0a5e Apache 2.4.24 doesn't send Content-Length: 0 headers for 204 No Content responses
...and is more strict parsing HTTP. Let tests pass on both old and new
versions.
2017-01-01 16:28:37 +01:00
Florian Schlichting
eaef540766 replace RRule with RRule-v2 2016-12-30 08:54:14 +01:00