diff --git a/interfaces/grafana_datasource_exchange/v0/interface_tests/test_provider.py b/interfaces/grafana_datasource_exchange/v0/interface_tests/test_provider.py index 1c5c88db..e35428e7 100644 --- a/interfaces/grafana_datasource_exchange/v0/interface_tests/test_provider.py +++ b/interfaces/grafana_datasource_exchange/v0/interface_tests/test_provider.py @@ -1,5 +1,3 @@ -import json - from interface_tester import Tester from scenario import State, Relation diff --git a/interfaces/grafana_datasource_exchange/v0/interface_tests/test_requirer.py b/interfaces/grafana_datasource_exchange/v0/interface_tests/test_requirer.py index 34220139..234a177f 100644 --- a/interfaces/grafana_datasource_exchange/v0/interface_tests/test_requirer.py +++ b/interfaces/grafana_datasource_exchange/v0/interface_tests/test_requirer.py @@ -1,2 +1,20 @@ -# given that this interface is symmetric, and we expect each provider -# to also be a requirer, we omit the requirer tests. \ No newline at end of file +from interface_tester import Tester +from scenario import State, Relation + + +def test_datasource_exchange(): + # GIVEN the grafana_datasource interface has shared one or more source UIDs + source_exchange = Relation( + endpoint='grafana-source-exchange', + interface='grafana_datasource_exchange', + remote_app_name='bar' + ) + tester = Tester(state_in=State( + relations=[ + source_exchange + ] + )) + # WHEN the requirer processes any relation event + tester.run('grafana-source-exchange-relation-changed') + # THEN the requirer publishes valid data + tester.assert_schema_valid()