FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: fix pr #961 by alexanderankin · Pull Request #1011 · testcontainers/testcontainers-python · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (4) .typed  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion core/testcontainers/core/config.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _render_bool(self, env_name: str, prop_name: str) -> bool:
https://github.com/testcontainers/testcontainers-go/blob/dd76d1e39c654433a3d80429690d07abcec04424/docker.go#L644
if os env TC_HOST is set, use it
"""
hub_image_name_prefix: str = environ.get("TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX", "")
hub_image_name_prefix: str = field(default_factory=lambda: environ.get("TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX", ""))
""" Prefix to use for hub image names, e.g. for private registries. """

@property
Expand Down
2 changes: 1 addition & 1 deletion core/testcontainers/core/container.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pathlib
import sys
import tarfile
from os import PathLike, getenv
from os import PathLike
from socket import socket
from types import TracebackType
from typing import TYPE_CHECKING, Any, Optional, TypedDict, Union, cast
Expand Down
2 changes: 1 addition & 1 deletion core/tests/test_compose.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def test_compose_normalize_rewrites_local_url_for_ssh_docker_host(
result = model.normalize()
assert result.URL == expected_url
assert result.PublishedPort == 9999


def test_container_info():
"""Test get_container_info functionality"""
Expand Down
4 changes: 3 additions & 1 deletion core/tests/test_config.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ def test_read_tc_properties(monkeypatch: MonkeyPatch) -> None:
config = TCC()
assert config.tc_properties == {"tc.host": "some_value"}


def test_hub_image_name_prefix(monkeypatch: MonkeyPatch) -> None:
"""
Ensure that the hub_image_name_prefix configuration variable can be read from the environment
"""
monkeypatch.setenv("TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX", "myregistry.local/")
config = TCC()
assert config.hub_image_name_prefix == "myregistry.local/"



def test_set_tc_properties(monkeypatch: MonkeyPatch) -> None:
"""
Ensure the configuration file variables can be read if no environment variable is set
Expand Down
1 change: 0 additions & 1 deletion modules/azurite/testcontainers/azurite/py.typed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

Loading

Back | FazBrowse Home | New Git URL