Don't fail test if data is empty

This keeps trimmed output from failing the test. We are still testing
with a specific module lower down in the test, so this doesn't reduce
our test coverage.
This commit is contained in:
Erik Johnson 2017-01-31 16:34:01 -06:00
parent 58e16a0d39
commit 316e62889a

View File

@ -313,9 +313,11 @@ class MatchTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
Test to see if we're not auto-adding '*' and 'sys.doc' to the call
'''
data = self.run_salt('-d -t 20')
self.assertIn('user.add:', data)
if data:
self.assertIn('user.add:', data)
data = self.run_salt('"*" -d -t 20')
self.assertIn('user.add:', data)
if data:
self.assertIn('user.add:', data)
data = self.run_salt('"*" -d user -t 20')
self.assertIn('user.add:', data)
data = self.run_salt('"*" sys.doc -d user -t 20')