Skip to content

Commit 8dab258

Browse files
author
Hugo Osvaldo Barrera
authored
Merge pull request #909 from pimutils/fastmail
Run Fastmail on CI again
2 parents 152ebb0 + f09d060 commit 8dab258

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

.builds/tests-release.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ sources:
1010
- https://github.com/pimutils/vdirsyncer
1111
secrets:
1212
- a36c8ba3-fba0-4338-b402-6aea0fbe771e
13+
- 4d9a6dfe-5c8d-48bd-b864-a2f5d772c536
1314
environment:
1415
BUILD: test
1516
CI: true
@@ -33,6 +34,19 @@ tasks:
3334
# Non-system python is used for packages:
3435
export PATH=$PATH:~/.local/bin/
3536
make -e style
37+
- check-secrets: |
38+
# Stop here if this is a PR. PRs can't run with the below secrets.
39+
[ -f ~/fastmail-secrets ] || complete-build
40+
- extra-storages: |
41+
set +x
42+
source ~/fastmail-secrets
43+
set -x
44+
45+
cd vdirsyncer
46+
export PATH=$PATH:~/.local/bin/
47+
DAV_SERVER=fastmail pytest tests/storage
48+
- check-tag: |
49+
# Stop here unless this is a tag.
3650
git describe --exact-match --tags || complete-build
3751
- publish: |
3852
cd vdirsyncer

tests/storage/servers/fastmail/__init__.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@
55

66
class ServerMixin:
77
@pytest.fixture
8-
def get_storage_args(self, item_type, slow_create_collection):
9-
if item_type == "VTODO":
10-
# Fastmail has non-standard support for TODOs
11-
# See https://github.com/pimutils/vdirsyncer/issues/824
12-
pytest.skip("Fastmail has non-standard VTODO support.")
8+
def get_storage_args(self, slow_create_collection, aio_connector, request):
9+
if "item_type" in request.fixturenames:
10+
if request.getfixturevalue("item_type") == "VTODO":
11+
# Fastmail has non-standard support for TODOs
12+
# See https://github.com/pimutils/vdirsyncer/issues/824
13+
pytest.skip("Fastmail has non-standard VTODO support.")
1314

1415
async def inner(collection="test"):
1516
args = {
1617
"username": os.environ["FASTMAIL_USERNAME"],
1718
"password": os.environ["FASTMAIL_PASSWORD"],
19+
"connector": aio_connector,
1820
}
1921

2022
if self.storage_class.fileext == ".ics":
@@ -25,7 +27,12 @@ async def inner(collection="test"):
2527
raise RuntimeError()
2628

2729
if collection is not None:
28-
args = slow_create_collection(self.storage_class, args, collection)
30+
args = await slow_create_collection(
31+
self.storage_class,
32+
args,
33+
collection,
34+
)
35+
2936
return args
3037

3138
return inner

0 commit comments

Comments
 (0)