diff --git a/salt/sensoroni/files/analyzers/helpers_test.py b/salt/sensoroni/files/analyzers/helpers_test.py index c10ff00d5..86d05a8bb 100644 --- a/salt/sensoroni/files/analyzers/helpers_test.py +++ b/salt/sensoroni/files/analyzers/helpers_test.py @@ -33,3 +33,14 @@ class TestHelpersMethods(unittest.TestCase): data = helpers.parseArtifact(input) self.assertEqual(data["artifactType"], "bar") self.assertEqual(data["value"], "foo") + + def test_verifyNonEmptyListValue(self): + conf = {"file_path": ['testfile.csv']} + path = 'file_path' + self.assertTrue(conf, path) + + def test_verifyNonEmptyListValueIsEmpty(self): + conf = {"file_path": ""} + with self.assertRaises(SystemExit) as cm: + helpers.verifyNonEmptyListValue(conf, 'file_path') + self.assertEqual(cm.exception.code, 126)