99 Commits

Author SHA1 Message Date
Andrew Ruthven
7c47658bee Make the curl and SQL requests when we see them
This allows us to have more complex test files where an action is taken, then
we test something, then another action is taken, etc.

Changes to test files are required so that URL is defined after all the
required settings are set.

Changes to the result files are either whitespace changes due to above logic
changes, or printing out a SQL Result header before each result. I figured it
was useful.
2024-04-01 22:57:10 +13:00
Andrew Ruthven
b26d48fced Put a trailing newline on error messages 2024-03-30 19:03:39 +13:00
Andrew Ruthven
28d9105810 Update database result results in tests. 2024-02-18 01:51:56 +13:00
Andrew Ruthven
1ca8284bdc Add ROOM as a principal type
This hopefully resolves #282.
2024-01-21 19:12:42 +13:00
Andrew Ruthven
15d01c8bed Store DTSTART and DTEND from user in shadow columns
We want to store the calculated dtstart and dtend in the database so we can
use SQL to fetch records. However, we also need what the user sent us so we
can allow prop-filters to be used as well.

So we store what the user sends us in dtstart_orig and dtend_orig and only
use for relevant prop-filter reports.
2023-03-12 20:17:43 +01:00
Andrew Ruthven
6819d6d7d1 Add a primary_key to the addressbook_addresses_* tables
This is part of the fix for #276.
2023-02-15 07:42:34 +00:00
Andrew Ruthven
fc09febad2 Update tests now that we don't inherit the DB from previous directory 2022-12-14 09:52:35 +13:00
Andrew Ruthven
d5cb124184 Report about dumping the database 2022-06-28 23:56:57 +12:00
Andrew Ruthven
c5cbd75be4 The knock on effects of making a new event for testing...
Missed one.
2021-09-19 02:43:34 +12:00
Andrew Ruthven
fbb6b34508 The knock on effects of making a new event for testing... 2021-09-19 02:33:32 +12:00
Florian Schlichting
90bcfba683 Update carddav/2042-REPORT-addressbook-query together with df6ff3a in AWL 2021-03-01 13:55:15 +08:00
Florian Schlichting
5ee16172af Add tests for AWLs "Fix param-filter that checks if a parameter is defined" 2021-02-08 17:38:17 +08:00
Florian Schlichting
9d144cfe24 Add test for AWLs "Fix param-filter for multi-value parameters with TYPE=T1,T2 format" and update 2044 accordingly
2044 wants VCARDs with either TEL or EMAIL of TYPE=WORK. !20 correctly
splits the comma separated list of parameters so another two vCards
now correctly match (see also
https://gitlab.com/davical-project/awl/-/merge_requests/20#note_503183133)
2021-02-08 17:29:26 +08:00
Florian Schlichting
fd35aacb85 Add tests for AWLs "Fix GetProperties: Select properties with group prefix" 2021-02-08 17:29:26 +08:00
Florian Schlichting
56dc373a71 Add tests for AWLs "Fix: GetProperties must treat property names as case-insensitive" 2021-02-08 17:29:26 +08:00
Andrew Ruthven
a1395eae0f Only return the fields that we need for the test 2021-02-07 01:28:06 +13:00
Andrew Ruthven
d822cdf4d0 Only return what we're testing, makes it easier to understand regressions 2021-02-06 19:51:43 +13:00
Andrew Ruthven
31fbfe5d88 Add test for anyof 2021-02-06 19:46:35 +13:00
Florian Schlichting
f37fa814b6 update 2038-REPORT-addressbook-query after AWL's param-filter: fix a typo / explode multivalue commit
this refers to 6395cd1 in AWL

the added results seem correct, as they all have a TEL;TYPE=WORK
property
2021-02-05 02:05:05 +08:00
Florian Schlichting
ec234cda64 correct test results after AWL merges of mstilkerich/awl-fix_abookquery_paramnotdef and mstilkerich/awl-fix_support_anyof_propfilter 2021-02-05 02:01:09 +08:00
Florian Schlichting
b863c99601 add two more reports testing an allof prop-filter and an anyof text-match prop-filter
BUG: both results are incorrect as explained in the tests. I thought I
should nevertheless commit them to illustrate the fix.
2021-02-05 02:01:09 +08:00
Florian Schlichting
b4f8f5a6c1 cardquery: ensure restriction to target collection remains in force even when we find that we need a post_filter step and thus throw away the SQL
this ensures a sane (but still wrong) result for
carddav/2051-REPORT-carddavclient-ParamNotDefinedSome
2021-02-05 02:01:09 +08:00
Florian Schlichting
6e87a1443c add a REPORT for a property with multiple values, not all of which match the is-not-defined filter (carddavclient's ParamNotDefinedSome test)
BUG: as explained in the test, this should not match Jonny2; and it
should most certainly not match those other VCARDs from a different
user's collections!
2021-02-05 02:01:09 +08:00
Florian Schlichting
57f0bc6e41 add 4 VCARDs from carddavclient AddressbookQueryTest
we will run these tests in user5's addresses
2021-02-05 02:00:42 +08:00
Andrew Ruthven
f94b000cc1 Correctly exclude cards where TYPE is not set on TEL records.
Commit f1bc3b0dc00d42bb6c3053559230690ae1a6745b in AWL fixed this behaviour.
2021-02-04 23:14:49 +13:00
Andrew Ruthven
963772a0f0 Fix the test result and hopefully make the description clearer 2021-02-04 23:08:05 +13:00
Andrew Ruthven
b00fc5d5e6 Merge remote-tracking branch 'origin/master' 2021-02-04 22:09:18 +13:00
Florian Schlichting
8239519ca3 Normalize "100 Continue" headers
apache2 in bullseye has stopped sending these for some reason, but we
want to be able to test in both newer and older environments
2021-02-03 00:42:58 +08:00
Andrew Ruthven
18c19b8fad Test case for awl-fix_abookquery_negated_propnotdef 2021-02-02 16:21:46 +00:00
Andrew Ruthven
bd075897bb Merge branch 'awl-fix_abookquery_paramtextmatch' 2021-02-01 23:28:36 +13:00
Andrew Ruthven
f250d2deb5 Test case for negated values in awl-fix_abookquery_paramtextmatch 2021-02-01 23:27:42 +13:00
Andrew Ruthven
696426bc81 Test case for awl-fix_abookquery_negated_propnotdef 2021-01-24 21:05:18 +13:00
Andrew Ruthven
9252a329d2 Test case for awl-fix_abookquery_paramtextmatch 2021-01-24 19:30:45 +13:00
Andrew Ruthven
e6a5fe8cb9 Test case for awl-fix_abookquery_paramtextmatch 2021-01-24 19:28:22 +13:00
Andrew Ruthven
d06c74b297 Add test secondary (or more) properties
This tests commit 1ef4c75 in AWL.
2021-01-24 00:02:31 +13: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
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
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
202542dc1b updates for bulk addressbook import 2017-01-07 02:17:29 +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
Andrew McMillan
f3b67a2c62 Improve result checking 2013-10-15 23:48:29 +13:00
Andrew McMillan
9fe1bc73b2 Case folding of property names 2013-10-15 23:47:47 +13:00
Andrew McMillan
48d22782f7 Correct regression host name. 2013-07-15 13:11:08 +12:00
Andrew McMillan
0fb4cdd6df URL fixes in regression tests. 2012-07-09 01:17:49 +12:00
Andrew McMillan
e3acbd6d14 Updated test results. 2012-07-09 01:17:33 +12:00
Andrew McMillan
3dba46cd8e Result of default props on an addressbok query. 2012-07-09 01:17:02 +12:00
Andrew McMillan
483683d3f6 Result ordering and other trivial regression test changes. 2012-05-14 23:26:12 +12:00
Andrew McMillan
677513b49d Current regression test results. 2012-05-03 19:12:42 +12:00
Andrew McMillan
7c15051f84 Further fixes to WebDAV synchronization.
This should be fully reliable now and also cleans out all sync
changes more than one week old.  update-database is needed to pull
the new function.
2012-04-17 15:44:09 +12:00