1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
|
Forwarded: not-needed
--- a/podman/tests/integration/test_containers.py
+++ b/podman/tests/integration/test_containers.py
@@ -36,6 +36,7 @@
for container in self.client.containers.list():
container.remove(force=True)
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_container_crud(self):
"""Test Container CRUD."""
@@ -172,6 +173,7 @@
with self.assertRaises(NotFound):
self.client.containers.get(top_ctnr.id)
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_container_commit(self):
"""Commit new image."""
busybox = self.client.images.pull("quay.io/libpod/busybox", tag="latest")
@@ -183,6 +185,7 @@
self.assertIn("localhost/busybox.local:unittest", image.attrs["RepoTags"])
busybox.remove(force=True)
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_container_rm_anonymous_volume(self):
with self.subTest("Check anonymous volume is removed"):
container_file = """
--- a/podman/tests/integration/test_images.py
+++ b/podman/tests/integration/test_images.py
@@ -136,6 +136,7 @@
next(self.client.images.load(b"This is a corrupt tarball"))
self.assertIn("payload does not match", e.exception.explanation)
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_build(self):
buffer = io.StringIO("""FROM quay.io/libpod/alpine_labels:latest""")
--- a/podman/tests/integration/test_manifests.py
+++ b/podman/tests/integration/test_manifests.py
@@ -27,6 +27,7 @@
with suppress(ImageNotFound):
self.client.images.remove("localhost/unittest/alpine", force=True)
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_manifest_crud(self):
"""Test Manifest CRUD."""
--- a/podman/tests/integration/test_pods.py
+++ b/podman/tests/integration/test_pods.py
@@ -62,6 +62,7 @@
with self.assertRaises(NotFound):
pod.reload()
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_pod_crud_infra(self):
"""Test Pod CRUD with infra container."""
@@ -99,6 +100,7 @@
with self.assertRaises(NotFound):
pod.reload()
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_ps(self):
pod = self.client.pods.create(
self.pod_name,
--- a/podman/tests/integration/base.py
+++ b/podman/tests/integration/base.py
@@ -24,6 +24,9 @@
from podman.tests.integration import utils
+HAVE_FUSE = os.path.exists('/dev/fuse')
+
+
class IntegrationTest(fixtures.TestWithFixtures):
"""Base Integration test case.
--- a/podman/tests/integration/test_adapters.py
+++ b/podman/tests/integration/test_adapters.py
@@ -11,6 +11,7 @@
def setUp(self):
super().setUp()
+ @unittest.skip('Does not work in Salsa CI')
def test_ssh_ping(self):
with PodmanClient(
base_url=f"http+ssh://{getpass.getuser()}@localhost:22{self.socket_file}"
--- a/podman/tests/integration/test_container_create.py
+++ b/podman/tests/integration/test_container_create.py
@@ -24,6 +24,7 @@
for container in self.containers:
container.remove(force=True)
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_container_named_volume_mount(self):
with self.subTest("Check volume mount"):
volumes = {
@@ -52,6 +53,7 @@
for o in other_options:
self.assertIn(o, mount.get('Options'))
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_container_directory_volume_mount(self):
"""Test that directories can be mounted with the ``volume`` parameter."""
with self.subTest("Check bind mount"):
@@ -79,6 +81,7 @@
self.assertEqual(container.attrs.get('State', dict()).get('ExitCode', 256), 0)
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_container_extra_hosts(self):
"""Test Container Extra hosts"""
extra_hosts = {"host1 host3": "127.0.0.2", "host2": "127.0.0.3"}
@@ -194,6 +197,7 @@
)
)
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_container_dns_option(self):
expected_dns_opt = ['edns0']
@@ -239,6 +243,7 @@
"""Test passing shared memory size"""
self._test_memory_limit('shm_size', 'ShmSize')
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_container_mounts(self):
"""Test passing mounts"""
with self.subTest("Check bind mount"):
@@ -311,6 +316,7 @@
self.assertEqual(container.attrs.get('State', dict()).get('ExitCode', 256), 0)
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_container_devices(self):
devices = ["/dev/null:/dev/foo", "/dev/zero:/dev/bar"]
container = self.client.containers.create(
@@ -356,6 +362,7 @@
# validate if proper device was added (by major/minor numbers)
self.assertEqual(source_match.group(1), destination_match.group(1))
+ @unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
def test_read_write_tmpfs(self):
test_cases = [
{"read_write_tmpfs": True, "failed_container": False},
--- a/podman/tests/integration/test_container_exec.py
+++ b/podman/tests/integration/test_container_exec.py
@@ -1,9 +1,11 @@
+import unittest
import podman.tests.integration.base as base
from podman import PodmanClient
# @unittest.skipIf(os.geteuid() != 0, 'Skipping, not running as root')
+@unittest.skipUnless(base.HAVE_FUSE, 'This test requires a working fuse setup.')
class ContainersExecIntegrationTests(base.IntegrationTest):
"""Containers integration tests for exec"""
|