fix 3006.x nightly, this test should have already been testing for exitcode 1 not 0. as the is_leader throws an exception internal to it.

This commit is contained in:
Thomas Phipps 2023-06-26 16:26:08 +00:00 committed by Megan Wilhite
parent 617f9e92de
commit 6f5b4e4e54

View file

@ -119,21 +119,21 @@ def test_reactor_is_leader(
When leader is set to false reactor should timeout/not do anything.
"""
ret = salt_run_cli.run("reactor.is_leader")
assert ret.returncode == 0
assert ret.returncode == 1
assert (
"salt.exceptions.CommandExecutionError: Reactor system is not running."
in ret.stdout
)
ret = salt_run_cli.run("reactor.set_leader", value=True)
assert ret.returncode == 0
assert ret.returncode == 1
assert (
"salt.exceptions.CommandExecutionError: Reactor system is not running."
in ret.stdout
)
ret = salt_run_cli.run("reactor.is_leader")
assert ret.returncode == 0
assert ret.returncode == 1
assert (
"salt.exceptions.CommandExecutionError: Reactor system is not running."
in ret.stdout
@ -220,7 +220,7 @@ def test_reactor_is_leader(
# Let's just confirm the engine is not running once again(because the config file is deleted by now)
ret = salt_run_cli.run("reactor.is_leader")
assert ret.returncode == 0
assert ret.returncode == 1
assert (
"salt.exceptions.CommandExecutionError: Reactor system is not running."
in ret.stdout