mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
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:
parent
957778e815
commit
30c692bf2d
1 changed files with 20 additions and 0 deletions
|
@ -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'
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue