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

[Tests]: Save output of the old access service #2146

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions cloud/storage/core/tools/testing/access_service/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

import contrib.ydb.tests.library.common.yatest_common as yatest_common

from contrib.ydb.tests.library.harness.daemon import Daemon
from cloud.storage.core.tools.common.python.daemon import Daemon
from contrib.ydb.tests.library.harness.kikimr_runner import get_unique_path_for_current_test, ensure_path_exists

logger = logging.getLogger(__name__)


class AccessService(Daemon):
class AccessService:

def __init__(self, host, port, control_server_port):
self.__host = host
Expand All @@ -32,7 +32,11 @@ def __init__(self, host, port, control_server_port):
"--port", str(self.__port),
"--control-server-port", str(self.__control_server_port)
]
self.__daemon = Daemon(command=command, cwd=self.__cwd, timeout=180)
self.__daemon = Daemon(
commands=[command],
cwd=self.__cwd,
service_name="access_service",
)

def start(self):
try:
Expand Down Expand Up @@ -63,7 +67,7 @@ def stop(self):
self.__daemon.stop()

def __get_pid(self):
return self.__daemon.daemon.process.pid
return self.__daemon.pid

def __url(self, path):
return "{}/{}".format(self.__control_url, path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ PY_SRCS(
)

PEERDIR(
cloud/storage/core/tools/common/python
contrib/python/requests/py3
contrib/ydb/tests/library
)
Expand Down
Loading