Beispiel #1
0
 def test_as_str_not_in_neuro_registry_tag_yes(self) -> None:
     image = RemoteImage(name="ubuntu",
                         tag="v10.04",
                         owner=None,
                         registry=None)
     assert str(image) == "ubuntu:v10.04"
     assert _as_repo_str(image) == "ubuntu:v10.04"
Beispiel #2
0
 def test_as_str_in_neuro_registry_tag_yes(self) -> None:
     image = RemoteImage(name="ubuntu",
                         tag="v10.04",
                         owner="me",
                         registry="registry.io")
     assert str(image) == "image://me/ubuntu:v10.04"
     assert _as_repo_str(image) == "registry.io/me/ubuntu:v10.04"
Beispiel #3
0
 def test_as_str_in_neuro_registry_tag_none(self) -> None:
     image = RemoteImage.new_neuro_image(
         name="ubuntu",
         tag=None,
         owner="me",
         cluster_name="test-cluster",
         registry="registry.io",
     )
     assert str(image) == "image://test-cluster/me/ubuntu"
     assert _as_repo_str(image) == "registry.io/me/ubuntu"
Beispiel #4
0
 def test_as_str_not_in_neuro_registry_tag_yes(self) -> None:
     image = RemoteImage.new_external_image(name="ubuntu", tag="v10.04")
     assert str(image) == "ubuntu:v10.04"
     assert _as_repo_str(image) == "ubuntu:v10.04"