Skip to content

Commit 7561f08

Browse files
committed
Fix the order of integrating with tmate in tests setup
1 parent b23f6f4 commit 7561f08

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

tests/integration/conftest.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,13 @@ async def app_scheduled_events_fixture(
519519
async def app_no_wait_tmate_fixture(
520520
model: Model,
521521
app_openstack_runner,
522+
tmate_ssh_server_app: Application,
522523
):
523524
"""Application to check tmate ssh with openstack without waiting for active."""
524525
application = app_openstack_runner
526+
await application.relate("debug-ssh", f"{tmate_ssh_server_app.name}:debug-ssh")
525527
await application.set_config({BASE_VIRTUAL_MACHINES_CONFIG_NAME: "1"})
528+
await model.wait_for_idle(apps=[tmate_ssh_server_app.name], status=ACTIVE, timeout=60 * 30)
526529
return application
527530

528531

@@ -582,14 +585,9 @@ async def app_no_wait_fixture(
582585

583586

584587
@pytest_asyncio.fixture(scope="module", name="tmate_ssh_server_app")
585-
async def tmate_ssh_server_app_fixture(
586-
model: Model, app_no_wait_tmate: Application
587-
) -> AsyncIterator[Application]:
588+
async def tmate_ssh_server_app_fixture( model: Model) -> AsyncIterator[Application]:
588589
"""tmate-ssh-server charm application related to GitHub-Runner app charm."""
589590
tmate_app: Application = await model.deploy("tmate-ssh-server", channel="edge")
590-
await app_no_wait_tmate.relate("debug-ssh", f"{tmate_app.name}:debug-ssh")
591-
await model.wait_for_idle(apps=[tmate_app.name], status=ACTIVE, timeout=60 * 30)
592-
593591
return tmate_app
594592

595593

0 commit comments

Comments
 (0)