Skip to content

Commit

Permalink
Use scarf names in tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
  • Loading branch information
eapolinario committed Feb 10, 2023
1 parent 29fd37d commit a4b37e8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/flytekit/unit/configuration/test_image_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
@pytest.mark.parametrize(
"python_version_enum, expected_image_string",
[
(PythonVersion.PYTHON_3_7, "ghcr.io/flyteorg/flytekit:py3.7-latest"),
(PythonVersion.PYTHON_3_8, "ghcr.io/flyteorg/flytekit:py3.8-latest"),
(PythonVersion.PYTHON_3_9, "ghcr.io/flyteorg/flytekit:py3.9-latest"),
(PythonVersion.PYTHON_3_10, "ghcr.io/flyteorg/flytekit:py3.10-latest"),
(PythonVersion.PYTHON_3_7, "cr.flyte.org/flyteorg/flytekit:py3.7-latest"),
(PythonVersion.PYTHON_3_8, "cr.flyte.org/flyteorg/flytekit:py3.8-latest"),
(PythonVersion.PYTHON_3_9, "cr.flyte.org/flyteorg/flytekit:py3.9-latest"),
(PythonVersion.PYTHON_3_10, "cr.flyte.org/flyteorg/flytekit:py3.10-latest"),
],
)
def test_defaults(python_version_enum, expected_image_string):
Expand All @@ -24,8 +24,8 @@ def test_defaults(python_version_enum, expected_image_string):
@pytest.mark.parametrize(
"python_version_enum, flytekit_version, expected_image_string",
[
(PythonVersion.PYTHON_3_7, "v0.32.0", "ghcr.io/flyteorg/flytekit:py3.7-0.32.0"),
(PythonVersion.PYTHON_3_8, "1.31.3", "ghcr.io/flyteorg/flytekit:py3.8-1.31.3"),
(PythonVersion.PYTHON_3_7, "v0.32.0", "cr.flyte.org/flyteorg/flytekit:py3.7-0.32.0"),
(PythonVersion.PYTHON_3_8, "1.31.3", "cr.flyte.org/flyteorg/flytekit:py3.8-1.31.3"),
],
)
def test_set_both(python_version_enum, flytekit_version, expected_image_string):
Expand All @@ -36,7 +36,7 @@ def test_image_config_auto():
x = ImageConfig.auto_default_image()
assert x.images[0].name == "default"
version_str = f"{sys.version_info.major}.{sys.version_info.minor}"
assert x.images[0].full == f"ghcr.io/flyteorg/flytekit:py{version_str}-latest"
assert x.images[0].full == f"cr.flyte.org/flyteorg/flytekit:py{version_str}-latest"


def test_image_from_flytectl_config():
Expand All @@ -56,7 +56,7 @@ def test_not_version(mock_sys):

def test_image_create():
with pytest.raises(ValueError):
ImageConfig.create_from("ghcr.io/im/g:latest")
ImageConfig.create_from("cr.flyte.org/im/g:latest")

ic = ImageConfig.from_images("ghcr.io/im/g:latest")
assert ic.default_image.fqn == "ghcr.io/im/g"
ic = ImageConfig.from_images("cr.flyte.org/im/g:latest")
assert ic.default_image.fqn == "cr.flyte.org/im/g"

0 comments on commit a4b37e8

Please sign in to comment.