Skip to content

Commit

Permalink
Remove requirer interface tests
Browse files Browse the repository at this point in the history
  • Loading branch information
theoctober19th committed Jan 31, 2025
1 parent 345f83f commit 6e63f28
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
1 change: 0 additions & 1 deletion interfaces/azure_storage/v0/interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ status: draft
providers:
- name: azure-storage-integrator
url: https://github.com/canonical/object-storage-integrators
branch: rename-azure-interface

requirers:
- name: spark-integration-hub-k8s
Expand Down
24 changes: 22 additions & 2 deletions interfaces/azure_storage/v0/interface_tests/test_provider.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from interface_tester import Tester
from scenario import State, Relation


def test_nothing_happens_if_remote_empty():
# GIVEN that the remote end has not published anything on databag
t = Tester(
Expand All @@ -20,4 +19,25 @@ def test_nothing_happens_if_remote_empty():
state_out = t.run("azure-storage-credentials-relation-joined")

# THEN no data is published to the (local) databags
t.assert_relation_data_empty()
t.assert_relation_data_empty()


def test_data_written_happy_path():
# GIVEN that the remote end has requested a container in the right format
t = Tester(
State(
leader=True,
relations=[
Relation(
endpoint="azure-storage-credentials",
interface="azure_storage",
remote_app_data={"container": "my-container"},
)
],
)
)
# WHEN this charm receives a relation-changed event
state_out = t.run("azure-storage-credentials-relation-changed")

# THEN the schema is satisfied (this charm published all required fields)
t.assert_schema_valid()
7 changes: 0 additions & 7 deletions interfaces/azure_storage/v0/interface_tests/test_requirer.py
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
# from scenario import State
# from interface_tester import Tester

# def test_data_published_on_joined():
# t = Tester(State())
# t.run("azure-storage-credentials-relation-joined")
# t.assert_relation_data_empty()

0 comments on commit 6e63f28

Please sign in to comment.