add convenience functions to gather config options

This commit adds 2 functions to the ModuleCase class allowing for easier
access to the configuration data
This commit is contained in:
Thomas S Hatch 2012-02-14 10:55:16 -07:00
parent 957778e815
commit 30c692bf2d

View file

@ -91,4 +91,24 @@ class ModuleCase(TestCase):
orig = self.client.cmd('minion', function, arg)
return orig['minion']
def minion_opts(self):
'''
Return the options used for the minion
'''
return salt.config.minion_config(
os.path.join(
TEST_DIR,
'files/conf/minion'
)
)
def master_opts(self):
'''
Return the options used for the minion
'''
return salt.config.minion_config(
os.path.join(
TEST_DIR,
'files/conf/master'
)
)