From 004278508c7449a7704c06bfe3af0792cf7f8d36 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 20 Apr 2020 02:21:49 +0100 Subject: [PATCH] Fix wrong/bad/buggy waiting logic --- tests/integration/loader/test_ext_grains.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/integration/loader/test_ext_grains.py b/tests/integration/loader/test_ext_grains.py index 488d46b17b5..fb4f6601b70 100644 --- a/tests/integration/loader/test_ext_grains.py +++ b/tests/integration/loader/test_ext_grains.py @@ -39,18 +39,21 @@ class LoaderGrainsTest(ModuleCase): # before trying to get the grains. This test may execute before the # minion has finished syncing down the files it needs. module = os.path.join( - RUNTIME_VARS.TMP, - "rootdir", - "cache", + RUNTIME_VARS.RUNTIME_CONFIGS["minion"]["cachedir"], "files", "base", "_grains", - "test_custom_grain2.py", + "custom_grain2.py", ) tries = 0 while not os.path.exists(module): tries += 1 if tries > 60: + self.fail( + "Failed to found custom grains module in cache path {}".format( + module + ) + ) break time.sleep(1) grains = self.run_function("grains.items")