diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/apiv2/20-containers.at | 5 | ||||
-rw-r--r-- | test/python/docker/__init__.py | 21 | ||||
-rw-r--r-- | test/python/docker/compat/test_system.py | 5 |
3 files changed, 21 insertions, 10 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at index 72003984f..e6d49ac25 100644 --- a/test/apiv2/20-containers.at +++ b/test/apiv2/20-containers.at @@ -18,6 +18,11 @@ podman rm -a -f &>/dev/null t GET "libpod/containers/json (at start: clean slate)" 200 length=0 +# Regression test for #12904 +podman run --rm -d --replace --name foo $IMAGE sh -c "echo 123;sleep 42" +t POST "containers/foo/attach?logs=true&stream=false" 200 +t POST "containers/foo/kill" 204 + podman run -v /tmp:/tmp $IMAGE true t GET libpod/containers/json 200 length=0 diff --git a/test/python/docker/__init__.py b/test/python/docker/__init__.py index 80fc2a133..816667b82 100644 --- a/test/python/docker/__init__.py +++ b/test/python/docker/__init__.py @@ -42,16 +42,19 @@ class Podman(object): os.environ["CONTAINERS_REGISTRIES_CONF"] = os.path.join( self.anchor_directory, "registry.conf" ) - p = configparser.ConfigParser() - p.read_dict( - { - "registries.search": {"registries": "['quay.io', 'docker.io']"}, - "registries.insecure": {"registries": "[]"}, - "registries.block": {"registries": "[]"}, - } - ) + conf = """unqualified-search-registries = ["docker.io", "quay.io"] + +[[registry]] +location="localhost:5000" +insecure=true + +[[registry.mirror]] +location = "mirror.localhost:5000" + +""" + with open(os.environ["CONTAINERS_REGISTRIES_CONF"], "w") as w: - p.write(w) + w.write(conf) os.environ["CNI_CONFIG_PATH"] = os.path.join( self.anchor_directory, "cni", "net.d" diff --git a/test/python/docker/compat/test_system.py b/test/python/docker/compat/test_system.py index 131b18991..a928de0ee 100644 --- a/test/python/docker/compat/test_system.py +++ b/test/python/docker/compat/test_system.py @@ -54,7 +54,10 @@ class TestSystem(unittest.TestCase): return super().tearDownClass() def test_Info(self): - self.assertIsNotNone(self.client.info()) + info = self.client.info() + self.assertIsNotNone(info) + self.assertEqual(info["RegistryConfig"]["IndexConfigs"]["localhost:5000"]["Secure"], False) + self.assertEqual(info["RegistryConfig"]["IndexConfigs"]["localhost:5000"]["Mirrors"], ["mirror.localhost:5000"]) def test_info_container_details(self): info = self.client.info() |