mirror of
https://github.com/containers/podman.git
synced 2025-07-30 11:52:47 +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())
|
||||
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."""
|
||||
with self._client() as podman:
|
||||
results = podman.PushImage(self._id, target, tlsverify)
|
||||
|
@ -102,7 +102,7 @@ class TestImages(PodmanTestCase):
|
||||
def test_push(self):
|
||||
path = '{}/alpine_push'.format(self.tmpdir)
|
||||
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, 'version')))
|
||||
|
Reference in New Issue
Block a user