Skip to content

Commit

Permalink
Pass environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Shmuma committed Dec 19, 2024
1 parent fb98c49 commit ef2eaa4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Calculate Test Coverage
run: poetry run nox -s test:coverage -- -- --db-version ${{ matrix.exasol-version }}
run: poetry run nox -s test:coverage
env:
TEST_DB_VERSION: ${{matrix.exasol-version}}
PYTEST_ADDOPTS: >
-W 'ignore::DeprecationWarning:luigi:'
-W 'ignore::DeprecationWarning:pkg_resources:'
Expand Down
5 changes: 5 additions & 0 deletions exasol/nb_connector/itde_manager.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from typing import Tuple, Optional
from enum import IntFlag

Expand All @@ -6,6 +7,7 @@
from exasol_integration_test_docker_environment.lib import api # type: ignore
from exasol_integration_test_docker_environment.lib.data.container_info import ContainerInfo # type: ignore
from exasol_integration_test_docker_environment.lib.data.environment_info import EnvironmentInfo # type: ignore
from exasol_integration_test_docker_environment.cli.options.test_environment_options import LATEST_DB_VERSION
from exasol_integration_test_docker_environment.lib.docker import ( # type: ignore
ContextDockerClient,
)
Expand All @@ -25,6 +27,7 @@

ENVIRONMENT_NAME = "DemoDb"
NAME_SERVER_ADDRESS = "8.8.8.8"
TEST_DB_VERSION_ENV_VAR = "TEST_DB_VERSION"


class ItdeContainerStatus(IntFlag):
Expand Down Expand Up @@ -64,11 +67,13 @@ def bring_itde_up(conf: Secrets, env_info: Optional[EnvironmentInfo] = None) ->
if env_info is None:
mem_size = f'{conf.get(AILabConfig.mem_size, "4")} GiB'
disk_size = f'{conf.get(AILabConfig.disk_size, "10")} GiB'
db_version = os.getenv(TEST_DB_VERSION_ENV_VAR, LATEST_DB_VERSION)
env_info, _ = api.spawn_test_environment(
environment_name=ENVIRONMENT_NAME,
nameserver=(NAME_SERVER_ADDRESS,),
db_mem_size=mem_size,
db_disk_size=disk_size,
docker_db_image_version=db_version,
)

db_info = env_info.database_info
Expand Down

0 comments on commit ef2eaa4

Please sign in to comment.