Open PietroPasotti opened 1 year ago
One possible API I have in mind at the moment is:
from interface_tester import register_test_case, Role, SchemaConfig
# minimal test case
register_test_case(
name='foo',
role=Role.requirer)
# schema
register_test_case(
name='bar',
role=Role.requirer,
schema=SchemaConfig.empty)
# validator, instead of the decorated function
register_test_case(
name='baz',
role=Role.provider,
validator=lambda output_state: output_state.status.unit.name == 'active')
When I'm reviewing this test for example, I have a hard time figuring out, what exactly are we validating. The same goes for the next one where the devil's in the "schema=SchemaConfig.empty" detail.
_Originally posted by @gruyaume in https://github.com/canonical/charm-relation-interfaces/pull/57#discussion_r1174022340_