How to use the podman.FoldedString function in podman

To help you get started, we’ve selected a few podman examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github containers / python-podman / test / test_images.py View on Github external
def test_create(self):
        img_details = self.alpine_image.inspect()

        actual = self.alpine_image.container(command=["sleep", "1h"])
        self.assertIsNotNone(actual)
        self.assertEqual(FoldedString(actual.status), "configured")

        ctnr = actual.start()
        self.assertEqual(FoldedString(ctnr.status), "running")

        ctnr_details = ctnr.inspect()
        for e in img_details.config["env"]:
            self.assertIn(e, ctnr_details.config["env"])
github containers / podman / contrib / python / pypodman / pypodman / lib / actions / ps_action.py View on Github external
                lambda c: podman.FoldedString(c['status']) == 'running',
                self.client.containers.list())