Skip to content

Commit 5f845ab

Browse files
committed
Use w in tests and remove sleep
1 parent d8ee696 commit 5f845ab

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tests/integration/test_charm.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ def test_service_status(app: str, juju: jubilant.Juju):
131131
"""
132132
# Wait until machine is ready, then wait an extra 60 seconds for services to fully activate.
133133
juju.wait(jubilant.all_active)
134-
sleep(60)
135134

136135
def get_services_dict(unit_name: str, juju: jubilant.Juju) -> dict[str, dict[str, bool | str]]:
137136
"""Get a dictionary of running systemd services on the app's unit.
@@ -177,13 +176,13 @@ def get_services_dict(unit_name: str, juju: jubilant.Juju) -> dict[str, dict[str
177176
else:
178177
node_id = int(unit_name.split("/")[-1])
179178

180-
assert services[f"git-ubuntu-importer-service-worker@{node_id}-0.service"]["active"]
179+
assert services[f"git-ubuntu-importer-service-worker@w{node_id}-0.service"]["active"]
181180
assert (
182-
services[f"git-ubuntu-importer-service-worker@{node_id}-0.service"]["description"]
181+
services[f"git-ubuntu-importer-service-worker@w{node_id}-0.service"]["description"]
183182
== "git-ubuntu importer service worker"
184183
)
185-
assert services[f"git-ubuntu-importer-service-worker@{node_id}-1.service"]["active"]
184+
assert services[f"git-ubuntu-importer-service-worker@w{node_id}-1.service"]["active"]
186185
assert (
187-
services[f"git-ubuntu-importer-service-worker@{node_id}-1.service"]["description"]
186+
services[f"git-ubuntu-importer-service-worker@w{node_id}-1.service"]["description"]
188187
== "git-ubuntu importer service worker"
189188
)

0 commit comments

Comments
 (0)