From 4b2036074521749926c47d4ae0047e9a4f6c4591 Mon Sep 17 00:00:00 2001 From: Simon Adorf Date: Thu, 17 Feb 2022 11:38:37 +0100 Subject: [PATCH] Tests: Add instance restart to lifecycle test. Fixes #103. --- tests/test_cli.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 526f6a1..b02db1c 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -215,15 +215,11 @@ def assert_status_down(): assert_status_up() # Restart instance. - # TODO: This test is currently disabled, because it is too flaky. For - # a currently unknown reason, the docker client will not be able to - # reach the container anymore to check whether the notebook server is - # online. - # result: Result = runner.invoke( - # cli.cli, ["start", "--no-browser", "--wait=120", "--restart"] - # ) - # assert result.exit_code == 0 - # assert_status_up() + result: Result = runner.invoke( + cli.cli, ["start", "--no-browser", "--no-pull", "--wait=120", "--restart"] + ) + assert result.exit_code == 0 + assert_status_up() # Stop (and remove) instance. result: Result = runner.invoke(cli.cli, ["stop", "--remove"])