Example #1
0
 def test_execute_valid_plugin(self):
     """Test that execute plugin works properly"""
     p = VogelerPlugin(plugin_dir=os.path.dirname(__file__)+'/fixtures/plugins/')
     results = p.execute_plugin('facter')
     syskey_subset = {'syskey' : node()}
     format_subset = {'format' : 'yaml'}
     self.assertType(results, 'dict')
     self.assertDictContainsSubset(syskey_subset, results)
     self.assertDictContainsSubset(format_subset, results)
Example #2
0
 def test_execute_valid_plugin(self):
     """Test that execute plugin works properly"""
     p = VogelerPlugin(plugin_dir=os.path.dirname(__file__) +
                       '/fixtures/plugins/')
     results = p.execute_plugin('facter')
     syskey_subset = {'syskey': node()}
     format_subset = {'format': 'yaml'}
     self.assertType(results, 'dict')
     self.assertDictContainsSubset(syskey_subset, results)
     self.assertDictContainsSubset(format_subset, results)
Example #3
0
 def test_execute_failing_plugin(self):
     """Test that execute does NOT work with a broken plugin"""
     with self.assertRaises(VogelerException):
         p = VogelerPlugin(plugin_dir=os.path.dirname(__file__) +
                           '/fixtures/plugins/')
         p.execute_plugin('broken')
Example #4
0
 def test_execute_unauth_plugin(self):
     """Test that execute does NOT work with an unauthorized plugin"""
     with self.assertRaises(VogelerException):
         p = VogelerPlugin()
         p.execute_plugin('invalid')
Example #5
0
 def test_execute_failing_plugin(self):
     """Test that execute does NOT work with a broken plugin"""
     with self.assertRaises(VogelerException):
         p = VogelerPlugin(plugin_dir=os.path.dirname(__file__)+'/fixtures/plugins/')
         p.execute_plugin('broken')
Example #6
0
 def test_execute_unauth_plugin(self):
     """Test that execute does NOT work with an unauthorized plugin"""
     with self.assertRaises(VogelerException):
         p = VogelerPlugin()
         p.execute_plugin('invalid')