We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests/unit/test_endpoints.py::test_snap_store is flaky, as the expiry time can be off by a second due to the way it is generated.
tests/unit/test_endpoints.py::test_snap_store
Put your machine under load, then run:
uv run pytest tests/unit/test_endpoints.py::test_snap_store
until you get it.
Or see: https://github.com/canonical/craft-store/actions/runs/12286865000/job/34287817294?pr=241
n/a
================================== FAILURES =================================== _______________________________ test_snap_store _______________________________ expires = <function expires.<locals>.offset_iso_dt at 0x000002D4A62ED800> def test_snap_store(expires): snap_store = endpoints.SNAP_STORE assert snap_store.tokens == "/api/v2/tokens" assert snap_store.tokens_exchange == "/api/v2/tokens/exchange" assert snap_store.whoami == "/api/v2/tokens/whoami" assert snap_store.upload == "/unscanned-upload/" > assert snap_store.get_token_request( permissions=["permission-foo", "permission-bar"], description="client description", ttl=1000, ) == { "permissions": ["permission-foo", "permission-bar"], "description": "client description", "expires": expires(1000), } E AssertionError: assert {'description...mission-bar']} == {'description...mission-bar']} E E Omitting 2 identical items, use -vv to show E Differing items: E {'expires': '2024-12-12T00:00:23+00:00'} != {'expires': '2024-12-12T00:00:22+00:00'} E E Full diff: E { E 'description': 'client description', E - 'expires': '2024-12-12T00:00:22+00:00', E ? ^ E + 'expires': '2024-12-12T00:00:23+00:00', E ? ^ E 'permissions': [ E 'permission-foo', E 'permission-bar', E ], E } tests\unit\test_endpoints.py:119: AssertionError =========================== short test summary info =========================== FAILED tests/unit/test_endpoints.py::test_snap_store - AssertionError: assert {'description...mission-bar']} == {'description...mission-bar']} Omitting 2 identical items, use -vv to show Differing items: {'expires': '2024-12-12T00:00:23+00:00'} != {'expires': '2024-12-12T00:00:22+00:00'} Full diff: { 'description': 'client description', - 'expires': '2024-12-12T00:00:22+00:00', ? ^ + 'expires': '2024-12-12T00:00:23+00:00', ? ^ 'permissions': [ 'permission-foo', 'permission-bar', ], } ================ 1 failed, 200 passed, 14 deselected in 4.78s =================
The text was updated successfully, but these errors were encountered:
Thank you for reporting us your feedback!
The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3800.
This message was autogenerated
Sorry, something went wrong.
No branches or pull requests
Bug Description
tests/unit/test_endpoints.py::test_snap_store
is flaky, as the expiry time can be off by a second due to the way it is generated.To Reproduce
Put your machine under load, then run:
uv run pytest tests/unit/test_endpoints.py::test_snap_store
until you get it.
Or see: https://github.com/canonical/craft-store/actions/runs/12286865000/job/34287817294?pr=241
part yaml
Relevant log output
The text was updated successfully, but these errors were encountered: