From 668ddb7458bb35aaad1f16d6fcd789656bf8d6e5 Mon Sep 17 00:00:00 2001 From: Eric Weber Date: Fri, 15 Dec 2023 15:15:34 -0600 Subject: [PATCH] Add skeleton for test_do_not_react_to_brief_kubelet_restart Longhorn 7302 Signed-off-by: Eric Weber --- manager/integration/tests/test_node.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/manager/integration/tests/test_node.py b/manager/integration/tests/test_node.py index 21602e75e8..e694143ff4 100644 --- a/manager/integration/tests/test_node.py +++ b/manager/integration/tests/test_node.py @@ -2806,3 +2806,17 @@ def test_auto_detach_volume_when_node_is_cordoned(client, core_api, volume_name) volumes = client.list_volume().data assert len(volumes) == 0 + +@pytest.mark.skip(reason="TODO") # NOQA +def test_do_not_react_to_brief_kubelet_restart(): + """ + Test the node controller ignores Ready == False due to KubeletNotReady for + ten seconds before reacting. + + Repeat the following five times: + 1. Verify status.conditions[type == Ready] == True for the Longhorn node we + are running on. + 2. Kill the kubelet process (e.g. `pkill kubelet`). + 3. Verify status.conditions[type == Ready] != False for the Longhorn node + we are running on at any point for at least ten seconds. + """