88
99@pytest .fixture (scope = "module" )
1010def docker_compose_file (pytestconfig ):
11- return os .path .join (str (pytestconfig .rootdir ), "docker- compose.yml" )
11+ return os .path .join (str (pytestconfig .rootdir ), "compose.yml" )
1212
1313
1414def wait_container_ready (driver ):
@@ -32,9 +32,14 @@ def wait_container_ready(driver):
3232
3333@pytest .fixture (scope = "module" )
3434def endpoint (pytestconfig , module_scoped_container_getter ):
35- with ydb .Driver (endpoint = "localhost:2136" , database = "/local" ) as driver :
35+ e = "grpc://localhost:2136"
36+ if os .environ .get ('REMOTE_CONTAINERS' ) is not None :
37+ e = "grpc://py-sdk-ydb:2136"
38+
39+ with ydb .Driver (endpoint = e , database = "/local" ) as driver :
3640 wait_container_ready (driver )
37- yield "localhost:2136"
41+
42+ yield e
3843
3944
4045@pytest .fixture (scope = "session" )
@@ -47,13 +52,19 @@ def secure_endpoint(pytestconfig, session_scoped_container_getter):
4752
4853 assert os .path .exists (ca_path )
4954 os .environ ["YDB_SSL_ROOT_CERTIFICATES_FILE" ] = ca_path
55+
56+ e = "grpcs://localhost:2135"
57+ if os .environ .get ('REMOTE_CONTAINERS' ) is not None :
58+ e = "grpcs://py-sdk-ydb:2135"
59+
5060 with ydb .Driver (
51- endpoint = "grpcs://localhost:2135" ,
61+ endpoint = e ,
5262 database = "/local" ,
5363 root_certificates = ydb .load_ydb_root_certificate (),
5464 ) as driver :
5565 wait_container_ready (driver )
56- yield "localhost:2135"
66+
67+ yield e
5768
5869
5970@pytest .fixture (scope = "module" )
0 commit comments