Skip to content

Commit

Permalink
Fix core connector whitelists in tests (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
MCPN authored Oct 25, 2023
1 parent 8027244 commit 26b9107
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
host_us_pg=get_test_container_hostport("pg-us", fallback_port=51810).host,
port_us_pg_5432=get_test_container_hostport("pg-us", fallback_port=51810).port,
us_master_token="AC1ofiek8coB",
core_connector_ep_names=["oracle"],
)

COMPOSE_PROJECT_NAME = os.environ.get("COMPOSE_PROJECT_NAME", "dl_connector_oracle")
Expand Down
1 change: 1 addition & 0 deletions lib/dl_core/dl_core_tests/db/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
host_us_pg=get_test_container_hostport("pg-us", fallback_port=50309).host,
port_us_pg_5432=get_test_container_hostport("pg-us", fallback_port=50309).port,
us_master_token="AC1ofiek8coB",
core_connector_ep_names=["clickhouse"],
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
)


CONNECTOR_WHITELIST = ["clickhouse", "file", "gsheets_v2"]


@attr.s(kw_only=True)
class TestingUSConfig:
container_name: str = attr.ib(default="bi_file_uploader_api_us-tests")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
S3Settings,
)
from dl_constants.api_constants import DLHeadersCommon
from dl_core.loader import load_core_lib
from dl_core.loader import (
CoreLibraryConfig,
load_core_lib,
)
from dl_core.services_registry.top_level import DummyServiceRegistry
from dl_core.united_storage_client import USAuthContextMaster
from dl_core.us_manager.us_manager_async import AsyncUSManager
Expand Down Expand Up @@ -71,7 +74,10 @@

from dl_connector_bundle_chs3.chs3_base.core.settings import FileS3ConnectorSettings

from .config import TestingUSConfig
from dl_file_uploader_api_lib_tests.config import (
CONNECTOR_WHITELIST,
TestingUSConfig,
)


if TYPE_CHECKING:
Expand Down Expand Up @@ -124,7 +130,7 @@ def us_config():

@pytest.fixture(scope="session", autouse=True)
def loaded_libraries():
load_core_lib()
load_core_lib(core_lib_config=CoreLibraryConfig(core_connector_ep_names=CONNECTOR_WHITELIST))


@pytest.fixture(scope="session")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
)


CONNECTOR_WHITELIST = ["clickhouse", "file", "gsheets_v2"]


@attr.s(kw_only=True)
class TestingUSConfig:
master_token: str = attr.ib(default="AC1ofiek8coB")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
RedisSettings,
S3Settings,
)
from dl_core.loader import load_core_lib
from dl_core.loader import (
CoreLibraryConfig,
load_core_lib,
)
from dl_core.services_registry.top_level import DummyServiceRegistry
from dl_core.united_storage_client import USAuthContextMaster
from dl_core.us_manager.us_manager_async import AsyncUSManager
Expand Down Expand Up @@ -64,7 +67,10 @@

from dl_connector_bundle_chs3.chs3_base.core.settings import FileS3ConnectorSettings

from .config import TestingUSConfig
from dl_file_uploader_worker_lib_tests.config import (
CONNECTOR_WHITELIST,
TestingUSConfig,
)


if TYPE_CHECKING:
Expand Down Expand Up @@ -106,7 +112,7 @@ def rci() -> RequestContextInfo:

@pytest.fixture(scope="session", autouse=True)
def loaded_libraries():
load_core_lib()
load_core_lib(core_lib_config=CoreLibraryConfig(core_connector_ep_names=CONNECTOR_WHITELIST))


@pytest.fixture(scope="session")
Expand Down

0 comments on commit 26b9107

Please sign in to comment.