You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
our coverage of the interface.py module lacks a little bit when it comes to unhappy-path tests.
In particular, the library is expected to gracefully handle situations when the databag doesn't contain data that is formatted in the expected way, but we aren't testing those paths.
focus on src/cosl/coordinated_workers/interface.py 330-331, 335-337, 342-344,
those are 'exception paths' in the cosl.coordinated_workers.interface.ClusterProvider.gather_addresses_by_role method
we should add one or multiple tests that exercise those blocks of code.
Those tests should live in the tests/test_coordinated_workers/test_coordinator.py module and use pytest and scenario.
Rough explanation of what the method is doing:
the ClusterProvider object is a relation endpoint wrapper for the 'cluster' relation interface.
That piece of code is responsible for walking through all units related over 'cluster' and collect a piece of data from their databags.
The expectation is that a log will be printed out if that fails (e.g. because the databag is badly formatted).
The text was updated successfully, but these errors were encountered:
I'd like to take on this issue as part of the Engineering Onboarding. Just so that I can update my Jira tickets, should this count as "Bug Fix / Feature" or "Tests" (or both 😃)?
I'd like to take on this issue as part of the Engineering Onboarding. Just so that I can update my Jira tickets, should this count as "Bug Fix / Feature" or "Tests" (or both 😃)?
Welcome to take a shot at it! I think this would qualify in the 'tests' category ;)
@lorenzo-medici do note that a colleague of yours already worked on some of those paths in #102
for some reason the PR wasn't linked to this feature, but so something has been done already. There's more still, you can re-run the coverage tool and see what's missing
The lines in interface.py that are specifically referenced have indeed already been included in the test coverage.
I'll expand the test coverage for ClusterRequirer in the same file, unless you suggest other things.
Bug Description
our coverage of the interface.py module lacks a little bit when it comes to unhappy-path tests.
In particular, the library is expected to gracefully handle situations when the databag doesn't contain data that is formatted in the expected way, but we aren't testing those paths.
To Reproduce
PYTHONPATH=.:src:lib pytest --cov
Environment
main
Relevant log output
Additional context
focus on src/cosl/coordinated_workers/interface.py 330-331, 335-337, 342-344,
those are 'exception paths' in the cosl.coordinated_workers.interface.ClusterProvider.gather_addresses_by_role method
we should add one or multiple tests that exercise those blocks of code.
Those tests should live in the tests/test_coordinated_workers/test_coordinator.py module and use pytest and scenario.
Rough explanation of what the method is doing:
the ClusterProvider object is a relation endpoint wrapper for the 'cluster' relation interface.
That piece of code is responsible for walking through all units related over 'cluster' and collect a piece of data from their databags.
The expectation is that a log will be printed out if that fails (e.g. because the databag is badly formatted).
The text was updated successfully, but these errors were encountered: