From 1ec162e946aebcd6b6ee4d792bfda56ce89d1211 Mon Sep 17 00:00:00 2001 From: Joseph Hall Date: Mon, 18 Sep 2023 19:14:04 -0600 Subject: [PATCH] Check for errors before result loop --- tests/pytests/functional/formulas/test_sudoers.py | 2 ++ tests/pytests/functional/formulas/test_vim.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/pytests/functional/formulas/test_sudoers.py b/tests/pytests/functional/formulas/test_sudoers.py index 9b2039305fd..015d3a13472 100644 --- a/tests/pytests/functional/formulas/test_sudoers.py +++ b/tests/pytests/functional/formulas/test_sudoers.py @@ -22,5 +22,7 @@ def modules(loaders, _formula): @pytest.mark.destructive_test def test_sudoers_formula(modules): ret = modules.state.sls("sudoers") + assert not ret.errors + assert ret.failed is False for staterun in ret: assert staterun.result is True diff --git a/tests/pytests/functional/formulas/test_vim.py b/tests/pytests/functional/formulas/test_vim.py index 5aab72f6c40..c612d92a07f 100644 --- a/tests/pytests/functional/formulas/test_vim.py +++ b/tests/pytests/functional/formulas/test_vim.py @@ -22,5 +22,7 @@ def modules(loaders, _formula): @pytest.mark.destructive_test def test_vim_formula(modules): ret = modules.state.sls("vim") + assert not ret.errors + assert ret.failed is False for staterun in ret: assert staterun.result is True