-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[master] Porting #49195 to master #54553
[master] Porting #49195 to master #54553
Conversation
@@ -112,55 +139,41 @@ def run_test(**kwargs): | |||
return "Test must be a dictionary" | |||
|
|||
|
|||
def run_state_tests(state): | |||
def run_state_tests(state, saltenv=None, check_all=False): | |||
''' | |||
Execute all tests for a salt state and return results | |||
Nested states will also be tested | |||
|
|||
:param str state: the name of a user defined state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a docstring for saltenv, too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I think the docstring for state
is now out of date.
@@ -321,6 +322,42 @@ def test__assert_less_equal3(self): | |||
mybool = sc_instance._SaltCheck__assert_less_equal(aaa, bbb) | |||
self.assertEqual(mybool, 'Pass') | |||
|
|||
def test__assert_empty(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great that we have additional tests here.
Maybe I'm missing something, but I'm not seeing tests for the new runtests functionality (saltenv, checkall).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is part of a series of updates for the saltcheck module, the latest of which is #53068. Might it make sense to allow these ports into master, and handle the doc and test updates as part of the most recent PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe?
Should #53068 to point at master?
I've ported these changes and the other neon saltcheck updates into #55613 |
Porting #49195 to master