Skip to content

Commit e37489e

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

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tests/test_Jail.py

Lines changed: 10 additions & 10 deletions
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
@@ -242,9 +242,9 @@ def test_can_be_started(
242242
existing_jail.start()
243243
assert existing_jail.running is True
244244

245-
root_path = existing_jail.root_dataset.name
245+
root_path = existing_jail.root_dataset.mountpoint
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"
@@ -268,7 +268,7 @@ def test_can_be_stopped(
268268
[f"/usr/sbin/jls", "-j", existing_jail.identifier]
269269
).decode("utf-8")
270270

271-
root_path = existing_jail.root_dataset.name
271+
root_path = existing_jail.root_dataset.mountpoint
272272
stdout = subprocess.check_output(
273273
[f"/sbin/mount | grep {root_path}"],
274274
shell=True

0 commit comments

Comments
 (0)