@@ -15,7 +15,6 @@ def test_uid_change(container: TrackedContainer) -> None:
15
15
"""Container should change the UID of the default user."""
16
16
logs = container .run_and_wait (
17
17
timeout = 120 , # usermod is slow so give it some time
18
- tty = True ,
19
18
user = "root" ,
20
19
environment = ["NB_UID=1010" ],
21
20
command = ["bash" , "-c" , "id && touch /opt/conda/test-file" ],
@@ -27,7 +26,6 @@ def test_gid_change(container: TrackedContainer) -> None:
27
26
"""Container should change the GID of the default user."""
28
27
logs = container .run_and_wait (
29
28
timeout = 10 ,
30
- tty = True ,
31
29
user = "root" ,
32
30
environment = ["NB_GID=110" ],
33
31
command = ["id" ],
@@ -40,7 +38,6 @@ def test_nb_user_change(container: TrackedContainer) -> None:
40
38
"""Container should change the username (`NB_USER`) of the default user."""
41
39
nb_user = "nayvoj"
42
40
container .run_detached (
43
- tty = True ,
44
41
user = "root" ,
45
42
environment = [f"NB_USER={ nb_user } " , "CHOWN_HOME=yes" ],
46
43
command = ["bash" , "-c" , "sleep infinity" ],
@@ -87,7 +84,6 @@ def test_chown_extra(container: TrackedContainer) -> None:
87
84
CHOWN_EXTRA list of folders."""
88
85
logs = container .run_and_wait (
89
86
timeout = 120 , # chown is slow so give it some time
90
- tty = True ,
91
87
user = "root" ,
92
88
environment = [
93
89
"NB_UID=1010" ,
@@ -110,7 +106,6 @@ def test_chown_home(container: TrackedContainer) -> None:
110
106
group to the current value of NB_UID and NB_GID."""
111
107
logs = container .run_and_wait (
112
108
timeout = 120 , # chown is slow so give it some time
113
- tty = True ,
114
109
user = "root" ,
115
110
environment = [
116
111
"CHOWN_HOME=yes" ,
@@ -128,7 +123,6 @@ def test_sudo(container: TrackedContainer) -> None:
128
123
"""Container should grant passwordless sudo to the default user."""
129
124
logs = container .run_and_wait (
130
125
timeout = 10 ,
131
- tty = True ,
132
126
user = "root" ,
133
127
environment = ["GRANT_SUDO=yes" ],
134
128
command = ["sudo" , "id" ],
@@ -140,7 +134,6 @@ def test_sudo_path(container: TrackedContainer) -> None:
140
134
"""Container should include /opt/conda/bin in the sudo secure_path."""
141
135
logs = container .run_and_wait (
142
136
timeout = 10 ,
143
- tty = True ,
144
137
user = "root" ,
145
138
environment = ["GRANT_SUDO=yes" ],
146
139
command = ["sudo" , "which" , "jupyter" ],
@@ -152,7 +145,6 @@ def test_sudo_path_without_grant(container: TrackedContainer) -> None:
152
145
"""Container should include /opt/conda/bin in the sudo secure_path."""
153
146
logs = container .run_and_wait (
154
147
timeout = 10 ,
155
- tty = True ,
156
148
user = "root" ,
157
149
command = ["which" , "jupyter" ],
158
150
)
@@ -224,7 +216,6 @@ def test_container_not_delete_bind_mount(
224
216
225
217
container .run_and_wait (
226
218
timeout = 5 ,
227
- tty = True ,
228
219
user = "root" ,
229
220
working_dir = "/home/" ,
230
221
environment = [
@@ -247,7 +238,6 @@ def test_jupyter_env_vars_to_unset(
247
238
root_args = {"user" : "root" } if enable_root else {}
248
239
logs = container .run_and_wait (
249
240
timeout = 10 ,
250
- tty = True ,
251
241
environment = [
252
242
"JUPYTER_ENV_VARS_TO_UNSET=SECRET_ANIMAL,UNUSED_ENV,SECRET_FRUIT" ,
253
243
"FRUIT=bananas" ,
@@ -276,7 +266,6 @@ def test_secure_path(container: TrackedContainer, tmp_path: pathlib.Path) -> Non
276
266
277
267
logs = container .run_and_wait (
278
268
timeout = 5 ,
279
- tty = True ,
280
269
user = "root" ,
281
270
volumes = {p : {"bind" : "/usr/bin/python" , "mode" : "ro" }},
282
271
command = ["python" , "--version" ],
@@ -290,7 +279,6 @@ def test_startsh_multiple_exec(container: TrackedContainer) -> None:
290
279
logs = container .run_and_wait (
291
280
timeout = 10 ,
292
281
no_warnings = False ,
293
- tty = True ,
294
282
user = "root" ,
295
283
environment = ["GRANT_SUDO=yes" ],
296
284
command = ["start.sh" , "sudo" , "id" ],
@@ -308,7 +296,6 @@ def test_rootless_triplet_change(container: TrackedContainer) -> None:
308
296
"""Container should change the username (`NB_USER`), the UID and the GID of the default user."""
309
297
logs = container .run_and_wait (
310
298
timeout = 10 ,
311
- tty = True ,
312
299
user = "root" ,
313
300
environment = ["NB_USER=root" , "NB_UID=0" , "NB_GID=0" ],
314
301
command = ["id" ],
@@ -322,7 +309,6 @@ def test_rootless_triplet_home(container: TrackedContainer) -> None:
322
309
"""Container should change the home directory for triplet NB_USER=root, NB_UID=0, NB_GID=0."""
323
310
logs = container .run_and_wait (
324
311
timeout = 10 ,
325
- tty = True ,
326
312
user = "root" ,
327
313
environment = ["NB_USER=root" , "NB_UID=0" , "NB_GID=0" ],
328
314
command = ["bash" , "-c" , "echo HOME=${HOME} && getent passwd root" ],
@@ -335,7 +321,6 @@ def test_rootless_triplet_sudo(container: TrackedContainer) -> None:
335
321
"""Container should not be started with sudo for triplet NB_USER=root, NB_UID=0, NB_GID=0."""
336
322
logs = container .run_and_wait (
337
323
timeout = 10 ,
338
- tty = True ,
339
324
user = "root" ,
340
325
environment = ["NB_USER=root" , "NB_UID=0" , "NB_GID=0" ],
341
326
command = ["env" ],
0 commit comments