Skip to content

Commit

Permalink
[Tests]: Save output of the old access service (#2146)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuradobery authored Sep 26, 2024
1 parent ebf0130 commit 3164c38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
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

0 comments on commit 3164c38

Please sign in to comment.