From d29e6c25acfd64224d96bd8659712ded1e5b5cd4 Mon Sep 17 00:00:00 2001 From: rigzba21 Date: Fri, 6 Aug 2021 16:11:00 -0400 Subject: [PATCH] adding rv check to test --- base-notebook/test/test_container_options.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/base-notebook/test/test_container_options.py b/base-notebook/test/test_container_options.py index 93a79719..5da6e077 100644 --- a/base-notebook/test/test_container_options.py +++ b/base-notebook/test/test_container_options.py @@ -198,7 +198,7 @@ def test_container_not_delete_bind_mount(container, tmp_path): p = d / "foo.txt" p.write_text("some-content") - container.run( + c = container.run( tty=True, user="root", working_dir="/home/", @@ -207,8 +207,9 @@ def test_container_not_delete_bind_mount(container, tmp_path): "CHOWN_HOME=yes", ], volumes={d: {"bind": "/home/jovyan/data", "mode": "rw"}}, - command=["start.sh", "jupyter", "lab"], + command=["start.sh", "ls"], ) - time.sleep(2) + rv = c.wait(timeout=5) + assert rv == 0 or rv["StatusCode"] == 0 assert p.read_text() == "some-content" assert len(list(tmp_path.iterdir())) == 1