Commit graph

661 commits

Author SHA1 Message Date
Hugo Osvaldo Barrera
b26e771865 Fix bad syntax for adding finalizers 2022-11-07 17:21:10 +01:00
Hugo Osvaldo Barrera
2fbb0ab7a5 Clean up some invalid TLS configuration branches 2022-09-20 23:01:50 +02:00
Hugo Osvaldo Barrera
60352f84fe Untangle auth handling
This was a bit entangled and messed up due to recent changes.
2022-09-20 23:01:50 +02:00
Hugo Osvaldo Barrera
b61095ad47 Async fixtures must be marked as such
pytest_asyncio now uses strict mode by default.
2022-09-20 23:01:47 +02:00
Hugo Osvaldo Barrera
843c58b92e Ignore flake8-bugbear false positive
See: https://github.com/PyCQA/flake8-bugbear/issues/269
2022-08-09 21:10:17 +02:00
pre-commit-ci[bot]
60c3b59552 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-03-21 22:41:54 +00:00
Corey Hinshaw
4dd15716db Adds shell strategy to config fetch params to run command string in a shell 2021-12-09 11:17:43 -05:00
pre-commit-ci[bot]
2c551afafb [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-12-06 20:14:52 +00:00
Hugo Osvaldo Barrera
c77d750ef6 Drop etesync
The current [experimental] implementation is stale, and hasn't been
maintained for a long time. Regrettably, not even its tests still work,
and there nobody interested in maintaining it.

If anyone is interested in re-implementing this in a third-party
package, I can consider adding support for pluggable storages.
2021-10-05 22:13:59 +02:00
Hugo Osvaldo Barrera
2e35214421 Remove unused import 2021-09-13 21:27:06 +02:00
pre-commit-ci[bot]
f5c2026dcf [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-09-13 18:57:16 +00:00
Hugo Osvaldo Barrera
955f434d9d Also test syncing with an href with a colon
Since this was the actual problematic character.
2021-08-18 18:41:00 +02:00
Hugo Osvaldo Barrera
889183ec89 I think this makes sense 2021-08-18 18:20:04 +02:00
Hugo Osvaldo Barrera
0650cc3bc2 Add test for #918
We're doing something wrong with UID/href quoting/unquoting, but I've
yet to figure out what.
2021-08-18 18:20:04 +02:00
Hugo Osvaldo Barrera
6281e7a237 Radicale now passes for this test 2021-08-18 18:20:04 +02:00
Hugo Osvaldo Barrera
1081a15895 Work around quirk in Fastmail
They seem to sort the parameters in an RRULE in a specific order, so
just use that by default to avoid any mismatch.
2021-08-16 22:29:16 +02:00
Hugo Osvaldo Barrera
cf1d082628 Use context managers for aio connectors
Not sure why we didn't do this initially, but this ensures that we
always close all connectors properly, and also gives much clearer scope
regarding their life-cycles.
2021-08-16 21:40:11 +02:00
Hugo Osvaldo Barrera
fed1ee69c3 Run pyupgrade 2021-08-04 19:58:59 +02:00
Hugo Osvaldo Barrera
f3714fc493 Add type hints and configure mypy
Configure mypy as a pre-commit hook and add all type hints necessary for
mypy to pass.

There's still more work to be done here typing a lot more code, but this
provides a clear starting point.
2021-08-03 19:23:37 +02:00
Hugo Osvaldo Barrera
7b493416f7
Merge pull request #920 from pimutils/meta_delete
metasync: use None as no-value and delete missing values on syncing
2021-07-26 13:07:45 +02:00
Hugo Osvaldo Barrera
5b8f00e720 Sort imports 2021-07-25 18:35:47 +02:00
Hugo Osvaldo Barrera
7379a96f73 Skip test on unsupported servers 2021-07-23 20:27:34 +02:00
Дилян Палаузов
c0ccb3d1aa metasync: use None as no-value and delete missing values on syncing
- change the interface of Storage.get_meta() and .set_meta()
  to use '' as the empty value and None as missing value.

- When a property is missing (e.g calendar-color was removed)
  in the filesystem storage delete the 'color' file, and
  in the WebDAV storage issue propertyupdate/remove call.

- remove the property from [status]/[pair]/[collection].metadata

I have adjusted, but not run the test suite.  On the other side
I tested on real system: source is CalDAV - destination is filesystem;
and source is CalDAV, destination is CalDAV (another account)
2021-07-23 19:07:02 +02:00
Hugo Osvaldo Barrera
71879045e4 Tidy up test collection creation
- No need to empty collections, they're generated with a UUID and should
  always be empty (the code to empty them does not actually run in CI
  right now).
- Move deletion code to _after_ the yield, since that's the order in
  which things happen.
- Delete all collections asynchronously.
2021-06-27 13:16:31 +02:00
Hugo Osvaldo Barrera
17f422c1b7 Auto-delete test containers 2021-06-26 19:59:56 +02:00
Hugo Osvaldo Barrera
ef2419efa9 Avoid running bogus tests with Fastmail
The fix that disabled VTODO tests accidentally ran all other tests twice
for this storage.

This wasn't picked up earlier since Fastmail is not currently running on
CI.
2021-06-26 18:12:54 +02:00
Hugo Osvaldo Barrera
2eff8e08e1 Fix breakage in Fastmail tests
Some code that wasn't updated with the switch to asyncio.
2021-06-26 18:12:22 +02:00
Hugo Osvaldo Barrera
1a1f6f0788 Initial async support
Add asyncio to the storage backends and most of the codebase. A lot of
it merely uses asyncio APIs, but still doesn't actually run several
things concurrently internally. Further improvements will be added on
top of these changes

Thanks to  Thomas Grainger (@graingert) for a few useful pointers
related to asyncio.
2021-06-26 13:40:35 +02:00
Hugo Osvaldo Barrera
623c0537e1 Update test 2021-06-26 13:02:41 +02:00
Hugo Osvaldo Barrera
4930b5f389 Drop multithreading support
This is mainly in preparation to moving to an async architecture.
2021-06-26 13:02:41 +02:00
Hugo Osvaldo Barrera
1f6cc6f8be Fix SSL tests failing due to old weak MDs
Had to drop pytest-localserver, since it's broken and upstream is gone.
2021-06-20 18:49:02 +02:00
Hugo Osvaldo Barrera
29528123a3 Add a command to print the current config
This is intended to be used by external tools and integrations (such as
daemons which trigger `vdirsyncer` when there's a change in a
collection).
2021-06-16 19:03:50 +02:00
Hugo Osvaldo Barrera
5e36ca1334 Optimize another very slow test 2021-06-12 23:49:23 +02:00
Hugo Osvaldo Barrera
2e4fc7c65a Drop unecessary hypothesis usage
This adds A LOT of time to test execution, for little benefit. While
having random data is good, in reality, most of it was just numbers, and
we rarely got very diverse data.

These hand-picked samples are as good to catch any regressions or issues
with servers.
2021-06-12 18:32:05 +02:00
Hugo Osvaldo Barrera
299c699cb9 Manage test DAV servers as fixtures
Rather than require manually starting them before tests, manage them as
fixtures an initialise/destroy them as needed.
2021-06-12 16:28:24 +02:00
Hugo Osvaldo Barrera
6c80293a98 Mark failing baikal tests as xfail 2021-06-12 13:26:01 +02:00
Hugo Osvaldo Barrera
a9fa61040f Tidy up some collection initializations 2021-06-12 13:23:54 +02:00
Hugo Osvaldo Barrera
eec142ac15 Drop mysteryshack support
It's been unmaintained for years, so no point in keeping track of
compatibility.
2021-06-12 12:06:07 +02:00
Hugo Osvaldo Barrera
91ffb931e1 Move baikal out-of-repo too 2021-06-12 12:06:07 +02:00
Hugo Osvaldo Barrera
bba9d43caf Remove empty install files 2021-06-12 12:06:03 +02:00
Hugo Osvaldo Barrera
d747977af2 Use externally-built containers for test servers
This speeds up CI by avoiding a rebuild of these container on each run.
2021-06-12 10:59:44 +02:00
Hugo Osvaldo Barrera
0e47775ce3 Remove unused submodules
These submodules were used to bootstrap local test servers for running
integration tests.

We'll be reusing that codebase inside docker containers, but don't want
the containers built for each push to this repo -- that'll happen in a
separate repository.
2021-06-12 10:59:44 +02:00
Hugo Osvaldo Barrera
d6c1b1847c Fix a few linting errors 2021-06-12 10:59:44 +02:00
Bernhard Reiter
9b5e01ab38
Improve storage/test_filesystem
with one additional test and fixing of the documentation.
2021-05-20 12:50:05 +02:00
Bernhard Reiter
804b9f0429
Add tests to filesystem storage for file ignorance
that ignore .tmp files even when fileext is empty.
Prepares to make the filesystem storage more universal as part of #881 .
2021-05-19 17:40:04 +02:00
Hugo Osvaldo Barrera
d2d41e5df1 Use black to auto-format the codebase 2021-05-06 19:28:54 +02:00
Hugo Osvaldo Barrera
fdc12d561c Update tests to work with hypothesis 6 2021-04-07 21:45:41 +02:00
Hugo Osvaldo Barrera
2685f8db68 Merge master into dav_default_ns 2021-04-07 08:42:29 +02:00
Hugo Osvaldo Barrera
2161de30d0 Avoid docker-compose
The way it handles docker networks breaks builds.
2021-04-06 19:53:00 +02:00
Hugo Osvaldo Barrera
255ea8f9bf This comparison actually does something 2021-04-05 23:28:39 +02:00