Skip to content

Commit c913834

Browse files
committed
github actions for ydb python sdk KIKIMR-13478
ref:8871205 sync: https://proxy.sandbox.yandex-team.ru/2583981409
1 parent 8f33846 commit c913834

File tree

6 files changed

+24
-15
lines changed

6 files changed

+24
-15
lines changed

docker-compose.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ services:
55
restart: always
66
ports:
77
- 2136:2136
8-
- 2135:2135
98
hostname: localhost
10-
volumes:
11-
- ./ydb_certs:/ydb_certs
129
environment:
1310
- YDB_USE_IN_MEMORY_PDISKS=true

examples/pagination/pagination.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def __init__(self, session, path, limit):
1616
self.last_number = None
1717

1818
next_page_query = """
19-
2019
PRAGMA TablePathPrefix("{path}");
2120
2221
DECLARE $limit AS Uint32;
@@ -47,7 +46,6 @@ def __init__(self, session, path, limit):
4746

4847
def get_first_page(self):
4948
query = """
50-
5149
PRAGMA TablePathPrefix("{path}");
5250
5351
DECLARE $limit AS Uint32;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: "3.9"
2+
services:
3+
ydb:
4+
image: cr.yandex/yc/yandex-docker-local-ydb:latest
5+
restart: always
6+
ports:
7+
- 2136:2136
8+
- 2135:2135
9+
hostname: localhost
10+
volumes:
11+
- ./ydb_certs:/ydb_certs
12+
environment:
13+
- YDB_USE_IN_MEMORY_PDISKS=true

kikimr/public/sdk/python/tests/conftest.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import pytest
33
import ydb
44
import time
5-
import shutil
65

76

87
@pytest.fixture(scope="module")
@@ -37,11 +36,9 @@ def endpoint(pytestconfig, module_scoped_container_getter):
3736
wait_container_ready(driver)
3837
yield "localhost:2136"
3938

40-
shutil.rmtree(os.path.join(str(pytestconfig.rootdir), "ydb_certs"))
4139

42-
43-
@pytest.fixture(scope="module")
44-
def secure_endpoint(pytestconfig, module_scoped_container_getter):
40+
@pytest.fixture(scope="session")
41+
def secure_endpoint(pytestconfig, session_scoped_container_getter):
4542
ca_path = os.path.join(str(pytestconfig.rootdir), "ydb_certs/ca.pem")
4643
iterations = 0
4744
while not os.path.exists(ca_path) and iterations < 10:
@@ -58,8 +55,6 @@ def secure_endpoint(pytestconfig, module_scoped_container_getter):
5855
wait_container_ready(driver)
5956
yield "localhost:2135"
6057

61-
shutil.rmtree(os.path.join(str(pytestconfig.rootdir), "ydb_certs"))
62-
6358

6459
@pytest.fixture(scope="module")
6560
def database():

kikimr/public/sdk/python/tests/ssl/test_ssl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# -*- coding: utf-8 -*-
22
import ydb
3+
import pytest
34

45

6+
@pytest.mark.tls
57
def test_connect_secure(secure_endpoint, database):
68
with ydb.Driver(
79
endpoint="grpcs://localhost:2135",

tox.ini

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,22 @@ deps =
1414
-r{toxinidir}/test-requirements.txt
1515

1616
[testenv:protoc]
17-
commands =
17+
commands =
1818
python3 generate_protoc.py
1919

2020
[testenv:py38]
2121
commands =
22-
pytest --docker-compose=docker-compose.yml --docker-compose-remove-volumes {posargs}
22+
pytest -v -m "not tls" --docker-compose-remove-volumes --docker-compose=docker-compose.yml {posargs}
23+
24+
[testenv:py38-tls]
25+
commands =
26+
pytest -v -m tls --docker-compose-remove-volumes --docker-compose=docker-compose-tls.yml {posargs}
2327

2428
[testenv:black]
2529
skip_install = true
2630
deps = black
2731
commands =
28-
black ydb examples tests/
32+
black ydb examples
2933

3034
[testenv:pylint]
3135
deps = pylint

0 commit comments

Comments
 (0)