Skip to content

Commit b9dcf44

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

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

tests/integration/test_charm.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import json
99
import logging
1010
import socket
11-
from time import sleep
1211

1312
import jubilant
1413

@@ -131,7 +130,6 @@ def test_service_status(app: str, juju: jubilant.Juju):
131130
"""
132131
# Wait until machine is ready, then wait an extra 60 seconds for services to fully activate.
133132
juju.wait(jubilant.all_active)
134-
sleep(60)
135133

136134
def get_services_dict(unit_name: str, juju: jubilant.Juju) -> dict[str, dict[str, bool | str]]:
137135
"""Get a dictionary of running systemd services on the app's unit.
@@ -177,13 +175,13 @@ def get_services_dict(unit_name: str, juju: jubilant.Juju) -> dict[str, dict[str
177175
else:
178176
node_id = int(unit_name.split("/")[-1])
179177

180-
assert services[f"git-ubuntu-importer-service-worker@{node_id}-0.service"]["active"]
178+
assert services[f"git-ubuntu-importer-service-worker@w{node_id}-0.service"]["active"]
181179
assert (
182-
services[f"git-ubuntu-importer-service-worker@{node_id}-0.service"]["description"]
180+
services[f"git-ubuntu-importer-service-worker@w{node_id}-0.service"]["description"]
183181
== "git-ubuntu importer service worker"
184182
)
185-
assert services[f"git-ubuntu-importer-service-worker@{node_id}-1.service"]["active"]
183+
assert services[f"git-ubuntu-importer-service-worker@w{node_id}-1.service"]["active"]
186184
assert (
187-
services[f"git-ubuntu-importer-service-worker@{node_id}-1.service"]["description"]
185+
services[f"git-ubuntu-importer-service-worker@w{node_id}-1.service"]["description"]
188186
== "git-ubuntu importer service worker"
189187
)

0 commit comments

Comments
 (0)