Skip to content

Commit ef2eaa4

Browse files
committed
Pass environment variable
1 parent fb98c49 commit ef2eaa4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/checks.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ jobs:
152152
python-version: ${{ matrix.python-version }}
153153

154154
- name: Calculate Test Coverage
155-
run: poetry run nox -s test:coverage -- -- --db-version ${{ matrix.exasol-version }}
155+
run: poetry run nox -s test:coverage
156156
env:
157+
TEST_DB_VERSION: ${{matrix.exasol-version}}
157158
PYTEST_ADDOPTS: >
158159
-W 'ignore::DeprecationWarning:luigi:'
159160
-W 'ignore::DeprecationWarning:pkg_resources:'

exasol/nb_connector/itde_manager.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from typing import Tuple, Optional
23
from enum import IntFlag
34

@@ -6,6 +7,7 @@
67
from exasol_integration_test_docker_environment.lib import api # type: ignore
78
from exasol_integration_test_docker_environment.lib.data.container_info import ContainerInfo # type: ignore
89
from exasol_integration_test_docker_environment.lib.data.environment_info import EnvironmentInfo # type: ignore
10+
from exasol_integration_test_docker_environment.cli.options.test_environment_options import LATEST_DB_VERSION
911
from exasol_integration_test_docker_environment.lib.docker import ( # type: ignore
1012
ContextDockerClient,
1113
)
@@ -25,6 +27,7 @@
2527

2628
ENVIRONMENT_NAME = "DemoDb"
2729
NAME_SERVER_ADDRESS = "8.8.8.8"
30+
TEST_DB_VERSION_ENV_VAR = "TEST_DB_VERSION"
2831

2932

3033
class ItdeContainerStatus(IntFlag):
@@ -64,11 +67,13 @@ def bring_itde_up(conf: Secrets, env_info: Optional[EnvironmentInfo] = None) ->
6467
if env_info is None:
6568
mem_size = f'{conf.get(AILabConfig.mem_size, "4")} GiB'
6669
disk_size = f'{conf.get(AILabConfig.disk_size, "10")} GiB'
70+
db_version = os.getenv(TEST_DB_VERSION_ENV_VAR, LATEST_DB_VERSION)
6771
env_info, _ = api.spawn_test_environment(
6872
environment_name=ENVIRONMENT_NAME,
6973
nameserver=(NAME_SERVER_ADDRESS,),
7074
db_mem_size=mem_size,
7175
db_disk_size=disk_size,
76+
docker_db_image_version=db_version,
7277
)
7378

7479
db_info = env_info.database_info

0 commit comments

Comments
 (0)