Skip to content

Commit ae4ebb1

Browse files
committed
Mark some tests with @pytest.mark.skipif
because Podman does not support bind mount. Related to #1483
1 parent 0309c88 commit ae4ebb1

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

tests/unit/test_editable.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
import tempfile
44
import time
55

6+
import pytest
7+
68
from repo2docker.__main__ import make_r2d
9+
from repo2docker.docker import DOCKER_CLI
710

811
DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), "dockerfile", "editable")
912

1013

14+
@pytest.mark.skipif(DOCKER_CLI == "podman", reason="Podman does NOT support bind mount")
1115
def test_editable(run_repo2docker):
1216
"""Run a local repository in edit mode. Verify a new file has been
1317
created afterwards"""
@@ -28,6 +32,7 @@ def test_editable(run_repo2docker):
2832
os.remove(newfile)
2933

3034

35+
@pytest.mark.skipif(DOCKER_CLI == "podman", reason="Podman does NOT support bind mount")
3136
def test_editable_by_host():
3237
"""Test whether a new file created by the host environment, is
3338
detected in the container"""

tests/unit/test_users.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
from getpass import getuser
1010
from unittest import mock
1111

12+
import pytest
13+
1214
from repo2docker import Repo2Docker
15+
from repo2docker.docker import DOCKER_CLI
1316

1417

1518
def test_automatic_username_deduction():
@@ -22,6 +25,7 @@ def test_automatic_username_deduction():
2225
assert r2d.user_name == expected
2326

2427

28+
@pytest.mark.skipif(DOCKER_CLI == "podman", reason="Podman does NOT support bind mount")
2529
def test_user():
2630
"""
2731
Validate user id and name setting

tests/unit/test_volumes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
import time
99
from getpass import getuser
1010

11+
import pytest
1112

13+
from repo2docker.docker import DOCKER_CLI
14+
15+
16+
@pytest.mark.skipif(DOCKER_CLI == "podman", reason="Podman does NOT support bind mount")
1217
def test_volume_abspath():
1318
"""
1419
Validate that you can bind mount a volume onto an absolute dir & write to it
@@ -39,6 +44,7 @@ def test_volume_abspath():
3944
assert f.read() == ts
4045

4146

47+
@pytest.mark.skipif(DOCKER_CLI == "podman", reason="Podman does NOT support bind mount")
4248
def test_volume_relpath():
4349
"""
4450
Validate that you can bind mount a volume onto an relative path & write to it

0 commit comments

Comments
 (0)