Skip to content

Commit 6f22f22

Browse files
authored
fix: Remove docker step from unit test workflow (#2535)
Signed-off-by: Achal Shah <[email protected]>
1 parent 695f5dd commit 6f22f22

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/unit_tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
PYTHON: ${{ matrix.python-version }}
1515
steps:
1616
- uses: actions/checkout@v2
17-
- uses: docker-practice/[email protected]
1817
- name: Setup Python
1918
id: setup-python
2019
uses: actions/setup-python@v2

sdk/python/tests/conftest.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,17 +173,18 @@ class TrinoContainerSingleton:
173173
catalog_dir = current_file.parent.joinpath(
174174
"integration/feature_repos/universal/data_sources/catalog"
175175
)
176-
177-
container = (
178-
DockerContainer("trinodb/trino:376")
179-
.with_volume_mapping(catalog_dir, "/etc/catalog/")
180-
.with_exposed_ports("8080")
181-
)
176+
container = None
182177
is_running = False
183178

184179
@classmethod
185180
def get_singleton(cls):
186181
if not cls.is_running:
182+
cls.container = (
183+
DockerContainer("trinodb/trino:376")
184+
.with_volume_mapping(cls.catalog_dir, "/etc/catalog/")
185+
.with_exposed_ports("8080")
186+
)
187+
187188
cls.container.start()
188189
log_string_to_wait_for = "SERVER STARTED"
189190
wait_for_logs(
@@ -194,7 +195,8 @@ def get_singleton(cls):
194195

195196
@classmethod
196197
def teardown(cls):
197-
cls.container.stop()
198+
if cls.container:
199+
cls.container.stop()
198200

199201

200202
@pytest.fixture(

0 commit comments

Comments
 (0)