Skip to content

Commit 2ff6c52

Browse files
committed
chore: look for mountpoint, not dataset name in tests
1 parent b5a7243 commit 2ff6c52

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/test_Jail.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_can_be_started(
8787
assert existing_jail.running is True
8888

8989
stdout = subprocess.check_output(
90-
[f"/sbin/mount | grep {existing_jail.root_dataset.name}"],
90+
[f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"],
9191
shell=True
9292
).decode("utf-8")
9393

@@ -104,15 +104,15 @@ def test_can_mount_devfs(
104104

105105
existing_jail.start()
106106
stdout = subprocess.check_output(
107-
[f"/sbin/mount | grep {existing_jail.root_dataset.name}"],
107+
[f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"],
108108
shell=True
109109
).decode("utf-8")
110110
assert "/dev" in stdout
111111
assert "/dev/fd" not in stdout
112112

113113
existing_jail.stop()
114114
stdout = subprocess.check_output(
115-
[f"/sbin/mount | grep {existing_jail.root_dataset.name}"],
115+
[f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"],
116116
shell=True
117117
).decode("utf-8")
118118
assert "/dev" not in stdout
@@ -128,15 +128,15 @@ def test_can_mount_fdescfs(
128128

129129
existing_jail.start()
130130
stdout = subprocess.check_output(
131-
[f"/sbin/mount | grep {existing_jail.root_dataset.name}"],
131+
[f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"],
132132
shell=True
133133
).decode("utf-8")
134134
assert "/dev/fd" in stdout
135135
assert "/dev (" not in stdout
136136

137137
existing_jail.stop()
138138
stdout = subprocess.check_output(
139-
[f"/sbin/mount | grep {existing_jail.root_dataset.name}"],
139+
[f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"],
140140
shell=True
141141
).decode("utf-8")
142142
assert "/dev/fd" not in stdout
@@ -152,15 +152,15 @@ def test_can_mount_devfs_and_fdescfs(
152152

153153
existing_jail.start()
154154
stdout = subprocess.check_output(
155-
[f"/sbin/mount | grep {existing_jail.root_dataset.name}"],
155+
[f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"],
156156
shell=True
157157
).decode("utf-8")
158158
assert "/dev (" in stdout
159159
assert "/dev/fd" in stdout
160160

161161
existing_jail.stop()
162162
stdout = subprocess.check_output(
163-
[f"/sbin/mount | grep {existing_jail.root_dataset.name}"],
163+
[f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"],
164164
shell=True
165165
).decode("utf-8")
166166
assert "/dev (" not in stdout
@@ -244,7 +244,7 @@ def test_can_be_started(
244244

245245
root_path = existing_jail.root_dataset.name
246246
stdout = subprocess.check_output(
247-
[f"/sbin/mount | grep {existing_jail.root_dataset.name}"],
247+
[f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"],
248248
shell=True
249249
).decode("utf-8")
250250
assert "launch-scripts in stdout"

0 commit comments

Comments
 (0)