Skip to content

Commit 42a76dd

Browse files
mr-callengau
andauthored
tests: xfail launchpad endpoint test (#602)
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com> Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
1 parent 8e9893d commit 42a76dd

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

tests/integration/launchpad/test_anonymous_access.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
11
"""Tests for anonymous access."""
22

3+
import datetime
4+
35
import pytest
46

57
from craft_application import launchpad
68

79

8-
def test_anonymous_login(tmp_path):
10+
@pytest.mark.parametrize(
11+
"root",
12+
[
13+
pytest.param(
14+
"staging",
15+
marks=pytest.mark.xfail(
16+
# Only xfail until the end of January.
17+
datetime.date.today() < datetime.date(2025, 2, 1),
18+
strict=False,
19+
reason="staging endpoint is offline",
20+
),
21+
),
22+
"production",
23+
],
24+
)
25+
def test_anonymous_login(tmp_path, root):
926
cache_dir = tmp_path / "cache"
1027
assert not cache_dir.exists()
1128

1229
launchpad.Launchpad.anonymous(
13-
"craft-application-integration-tests", root="staging", cache_dir=cache_dir
30+
"craft-application-integration-tests", root=root, cache_dir=cache_dir
1431
)
1532

1633
assert cache_dir.is_dir()

0 commit comments

Comments
 (0)