Skip to content

test: fix test suite compatibility with upgraded test dependencies#98

Merged
alexsander-souza merged 2 commits intocanonical:resolute_supportfrom
alexsander-souza:pr/10-test-framework
Apr 2, 2026
Merged

test: fix test suite compatibility with upgraded test dependencies#98
alexsander-souza merged 2 commits intocanonical:resolute_supportfrom
alexsander-souza:pr/10-test-framework

Conversation

@alexsander-souza
Copy link
Copy Markdown
Contributor

Fix test failures introduced by the dependency version bumps. No production code changes.

  • pytest-asyncio 1.x: add explicit asyncio reactor event loop setup in maastesting
  • hypothesis 6.151: replace timing-sensitive Hypothesis tests with deterministic equivalents; reduce max_examples in parallel tests
  • httpx 0.28: wrap app in ASGITransport; move cookie setup to client instance (AsyncClient(app=...) constructor deprecated)
  • testtools 2.8: add assertCountEqual shim to MAASTestCase
  • TLS test fixtures: regenerate certificates with subjectAltName extension required by modern SSL contexts; update data_test_main/generate.sh
  • libuuid: disable affected test cases with upstream bug reference

Copy link
Copy Markdown
Contributor

@r00ta r00ta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question inline


class TestUUIDToTimestamp(MAASTestCase):
def test_round_trip_preserves_timestamp(self):
self.skipTest("UUID1 timestamps offset due to libuuid bug (LP#2145734)")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use uuid_to_timestamp in many places and the bug mentioned is changing the behavior of the function. Is this going to break existing functionalities? Instead of skipping the test, do we have to fix the function somehow?

Copy link
Copy Markdown
Contributor Author

@alexsander-souza alexsander-souza Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It breaks the beacon only. My suggestion is to skip these tests for now, enabling us to merge the migration to Resolute into master. The timeline to fix the issue is uncertain, as it might involve the upstream, but we should look for a solution before releasing 3.8

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please open a ticket in jira to keep track of it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/tests/maasapiserver/v3/api/public/handlers/test_auth.py Outdated
Fix test failures introduced by the dependency version bumps in PR-03.
No production code changes.

- pytest-asyncio 1.x: add explicit asyncio reactor event loop setup in maastesting
- hypothesis 6.151: replace timing-sensitive Hypothesis tests with
  deterministic equivalents; reduce max_examples in parallel tests
- httpx 0.28: wrap app in ASGITransport; move cookie setup to client
  instance (AsyncClient(app=...) constructor deprecated)
- testtools 2.8: add assertCountEqual shim to MAASTestCase
- TLS test fixtures: regenerate certificates with subjectAltName extension
  required by modern SSL contexts; update data_test_main/generate.sh
- libuuid: disable affected test cases with upstream bug reference
Remove HTTP endpoint delimiters and trivial comments that add no value
to code comprehension. Improve clarity through self-documenting variable
names (e.g., state_with_redirect) and extract the JSON dump mock helper
to module level for reusability.
@alexsander-souza alexsander-souza merged commit cc2a94c into canonical:resolute_support Apr 2, 2026
1 of 2 checks passed
@alexsander-souza alexsander-souza deleted the pr/10-test-framework branch April 2, 2026 15:11
alexsander-souza added a commit that referenced this pull request Apr 8, 2026
Fix test failures introduced by the dependency version bumps. No
production code changes.

- pytest-asyncio 1.x: add explicit asyncio reactor event loop setup in
maastesting
- hypothesis 6.151: replace timing-sensitive Hypothesis tests with
deterministic equivalents; reduce max_examples in parallel tests
- httpx 0.28: wrap app in ASGITransport; move cookie setup to client
instance (AsyncClient(app=...) constructor deprecated)
- testtools 2.8: add assertCountEqual shim to MAASTestCase
- TLS test fixtures: regenerate certificates with subjectAltName
extension required by modern SSL contexts; update
data_test_main/generate.sh
- libuuid: disable affected test cases with upstream bug reference
alexsander-souza added a commit that referenced this pull request Apr 8, 2026
Fix test failures introduced by the dependency version bumps. No
production code changes.

- pytest-asyncio 1.x: add explicit asyncio reactor event loop setup in
maastesting
- hypothesis 6.151: replace timing-sensitive Hypothesis tests with
deterministic equivalents; reduce max_examples in parallel tests
- httpx 0.28: wrap app in ASGITransport; move cookie setup to client
instance (AsyncClient(app=...) constructor deprecated)
- testtools 2.8: add assertCountEqual shim to MAASTestCase
- TLS test fixtures: regenerate certificates with subjectAltName
extension required by modern SSL contexts; update
data_test_main/generate.sh
- libuuid: disable affected test cases with upstream bug reference
alexsander-souza added a commit that referenced this pull request Apr 9, 2026
Fix test failures introduced by the dependency version bumps. No
production code changes.

- pytest-asyncio 1.x: add explicit asyncio reactor event loop setup in
maastesting
- hypothesis 6.151: replace timing-sensitive Hypothesis tests with
deterministic equivalents; reduce max_examples in parallel tests
- httpx 0.28: wrap app in ASGITransport; move cookie setup to client
instance (AsyncClient(app=...) constructor deprecated)
- testtools 2.8: add assertCountEqual shim to MAASTestCase
- TLS test fixtures: regenerate certificates with subjectAltName
extension required by modern SSL contexts; update
data_test_main/generate.sh
- libuuid: disable affected test cases with upstream bug reference
alexsander-souza added a commit that referenced this pull request Apr 17, 2026
Fix test failures introduced by the dependency version bumps. No
production code changes.

- pytest-asyncio 1.x: add explicit asyncio reactor event loop setup in
maastesting
- hypothesis 6.151: replace timing-sensitive Hypothesis tests with
deterministic equivalents; reduce max_examples in parallel tests
- httpx 0.28: wrap app in ASGITransport; move cookie setup to client
instance (AsyncClient(app=...) constructor deprecated)
- testtools 2.8: add assertCountEqual shim to MAASTestCase
- TLS test fixtures: regenerate certificates with subjectAltName
extension required by modern SSL contexts; update
data_test_main/generate.sh
- libuuid: disable affected test cases with upstream bug reference
alexsander-souza added a commit that referenced this pull request Apr 17, 2026
Fix test failures introduced by the dependency version bumps. No
production code changes.

- pytest-asyncio 1.x: add explicit asyncio reactor event loop setup in
maastesting
- hypothesis 6.151: replace timing-sensitive Hypothesis tests with
deterministic equivalents; reduce max_examples in parallel tests
- httpx 0.28: wrap app in ASGITransport; move cookie setup to client
instance (AsyncClient(app=...) constructor deprecated)
- testtools 2.8: add assertCountEqual shim to MAASTestCase
- TLS test fixtures: regenerate certificates with subjectAltName
extension required by modern SSL contexts; update
data_test_main/generate.sh
- libuuid: disable affected test cases with upstream bug reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants