mirror of
https://github.com/containers/podman.git
synced 2025-08-01 04:42:20 +08:00
Invert tlsverify default in API
Fixes #1929 Signed-off-by: Jhon Honce <jhonce@redhat.com>
This commit is contained in:
@ -75,7 +75,7 @@ class Image(collections.UserDict):
|
|||||||
obj = json.loads(results['image'], object_hook=fold_keys())
|
obj = json.loads(results['image'], object_hook=fold_keys())
|
||||||
return collections.namedtuple('ImageInspect', obj.keys())(**obj)
|
return collections.namedtuple('ImageInspect', obj.keys())(**obj)
|
||||||
|
|
||||||
def push(self, target, tlsverify=False):
|
def push(self, target, tlsverify=True):
|
||||||
"""Copy image to target, return id on success."""
|
"""Copy image to target, return id on success."""
|
||||||
with self._client() as podman:
|
with self._client() as podman:
|
||||||
results = podman.PushImage(self._id, target, tlsverify)
|
results = podman.PushImage(self._id, target, tlsverify)
|
||||||
|
@ -102,7 +102,7 @@ class TestImages(PodmanTestCase):
|
|||||||
def test_push(self):
|
def test_push(self):
|
||||||
path = '{}/alpine_push'.format(self.tmpdir)
|
path = '{}/alpine_push'.format(self.tmpdir)
|
||||||
target = 'dir:{}'.format(path)
|
target = 'dir:{}'.format(path)
|
||||||
self.alpine_image.push(target)
|
self.alpine_image.push(target, tlsverify=False)
|
||||||
|
|
||||||
self.assertTrue(os.path.isfile(os.path.join(path, 'manifest.json')))
|
self.assertTrue(os.path.isfile(os.path.join(path, 'manifest.json')))
|
||||||
self.assertTrue(os.path.isfile(os.path.join(path, 'version')))
|
self.assertTrue(os.path.isfile(os.path.join(path, 'version')))
|
||||||
|
Reference in New Issue
Block a user