Update pytest fixture for async functions

Bug #1983398 reported by Tianqi Xiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Nagios Charm
Fix Released
Undecided
Tianqi Xiao
Thruk Agent Charm
Fix Released
Undecided
Tianqi Xiao
charm-advanced-routing
Fix Released
Undecided
Mert Kirpici
charm-infra-node
Fix Released
Undecided
Tianqi Xiao
charm-sysconfig
Fix Released
Undecided
Tianqi Xiao
hw-health-charm
Fix Released
Undecided
Robert Gildein
juju-autoreg
Won't Fix
Undecided
Unassigned
logrotate-charm
Fix Released
Undecided
Tianqi Xiao

Bug Description

Starting from `pytest-asyncio`'s most recent release (version 0.19.0), strict mode is enforced by default [1], which requires the usage of `@pytest.mark.asyncio` and `@pytest_asyncio.fixture` [2]. Without these markers, tests and fixtures are not considered as asyncio-driven, resulting functional tests failures.

For charms using pytest framework, we need to update their functional tests by replacing the current used `@pytest.fixture` with `@pytest_asyncio.fixture` in test files.

[1]: https://github.com/pytest-dev/pytest-asyncio/issues/390
[2]: https://github.com/pytest-dev/pytest-asyncio#strict-mode

Related branches

Tianqi Xiao (txiao)
description: updated
Changed in charm-infra-node:
status: New → In Progress
Tianqi Xiao (txiao)
Changed in charm-nagios:
status: New → Fix Committed
status: Fix Committed → In Progress
assignee: nobody → Tianqi Xiao (txiao)
Changed in charm-thruk-agent:
status: New → In Progress
assignee: nobody → Tianqi Xiao (txiao)
Changed in charm-infra-node:
status: In Progress → Fix Committed
Tianqi Xiao (txiao)
Changed in charm-nagios:
status: In Progress → Fix Committed
Changed in charm-thruk-agent:
status: In Progress → Fix Committed
Tianqi Xiao (txiao)
no longer affects: charm-advanced-routing
Tianqi Xiao (txiao)
Changed in charm-logrotated:
status: New → In Progress
assignee: nobody → Tianqi Xiao (txiao)
Tianqi Xiao (txiao)
Changed in charm-logrotated:
status: In Progress → Fix Committed
Tianqi Xiao (txiao)
Changed in charm-sysconfig:
status: New → In Progress
assignee: nobody → Tianqi Xiao (txiao)
Tianqi Xiao (txiao)
Changed in charm-sysconfig:
status: In Progress → Fix Committed
Changed in charm-hw-health:
assignee: nobody → Robert Gildein (rgildein)
status: New → In Progress
Changed in charm-hw-health:
status: In Progress → Fix Committed
Eric Chen (eric-chen)
Changed in charm-infra-node:
milestone: none → 22.08
Changed in charm-sysconfig:
milestone: none → 22.08
Changed in charm-hw-health:
milestone: none → 22.08
Changed in charm-logrotated:
milestone: none → 22.08
Changed in charm-sysconfig:
status: Fix Committed → Fix Released
Changed in charm-infra-node:
status: Fix Committed → Fix Released
Changed in charm-hw-health:
status: Fix Committed → Fix Released
Changed in charm-logrotated:
status: Fix Committed → Fix Released
Chi Wai CHAN (raychan96)
Changed in charm-thruk-agent:
milestone: none → 22.10
Changed in charm-nagios:
milestone: none → 22.10
Chi Wai CHAN (raychan96)
Changed in charm-thruk-agent:
status: Fix Committed → Fix Released
Changed in charm-nagios:
status: Fix Committed → Fix Released
Changed in charm-advanced-routing:
assignee: nobody → Mert Kirpici (mertkirpici)
status: New → In Progress
Eric Chen (eric-chen)
Changed in charm-advanced-routing:
status: In Progress → Invalid
Eric Chen (eric-chen)
tags: added: good-first-bug
Eric Chen (eric-chen)
Changed in charm-advanced-routing:
status: Invalid → Fix Committed
Changed in charm-advanced-routing:
milestone: none → 23.01
Changed in charm-advanced-routing:
status: Fix Committed → Fix Released
Eric Chen (eric-chen)
Changed in juju-autoreg:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.