Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/private endpoint cleanup #366

Merged
merged 11 commits into from
Sep 20, 2024
10 changes: 5 additions & 5 deletions tests/integration/test_runner_manager_openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import json
from pathlib import Path
from secrets import token_hex
from typing import Iterator
from typing import AsyncGenerator, Iterator

import pytest
import pytest_asyncio
Expand Down Expand Up @@ -105,7 +105,7 @@ async def openstack_runner_manager_fixture(
proxy_config: ProxyConfig,
runner_label: str,
openstack_connection: OpenstackConnection,
) -> OpenStackRunnerManager:
) -> AsyncGenerator[OpenStackRunnerManager, None]:
"""Create OpenstackRunnerManager instance.

The prefix args of OpenstackRunnerManager set to app_name to let openstack_connection_fixture
Expand Down Expand Up @@ -133,7 +133,7 @@ async def openstack_runner_manager_fixture(
ssh_debug_connections=None,
repo_policy_compliance=None,
)
return OpenStackRunnerManager(
yield OpenStackRunnerManager(
app_name, f"{app_name}-0", cloud_config, server_config, runner_config, service_config
)

Expand All @@ -144,13 +144,13 @@ async def runner_manager_fixture(
token: str,
github_path: GitHubPath,
log_dir_base_path: dict[str, Path],
) -> RunnerManager:
) -> AsyncGenerator[RunnerManager, None]:
"""Get RunnerManager instance.

Import of log_dir_base_path to monkeypatch the runner logs path with tmp_path.
"""
config = RunnerManagerConfig(token, github_path)
return RunnerManager("test_runner", openstack_runner_manager, config)
yield RunnerManager("test_runner", openstack_runner_manager, config)


@pytest_asyncio.fixture(scope="function", name="runner_manager_with_one_runner")
Expand Down
Loading