mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix hosts integration test
This commit is contained in:
parent
15a7e98563
commit
d7800567f5
3 changed files with 4 additions and 6 deletions
|
@ -21,10 +21,6 @@ def __get_hosts_filename():
|
|||
'''
|
||||
Return the path to the appropriate hosts file
|
||||
'''
|
||||
# TODO: Investigate using "%SystemRoot%\system32" for this
|
||||
if salt.utils.is_windows():
|
||||
return 'C:\\Windows\\System32\\drivers\\etc\\hosts'
|
||||
|
||||
return __salt__['config.option']('hosts.file')
|
||||
|
||||
|
||||
|
|
|
@ -1018,6 +1018,8 @@ class TestDaemon(object):
|
|||
minion_opts['config_dir'] = TMP_CONF_DIR
|
||||
minion_opts['root_dir'] = os.path.join(TMP, 'rootdir')
|
||||
minion_opts['pki_dir'] = os.path.join(TMP, 'rootdir', 'pki')
|
||||
minion_opts['hosts.file'] = os.path.join(TMP, 'rootdir', 'hosts')
|
||||
minion_opts['aliases.file'] = os.path.join(TMP, 'rootdir', 'aliases')
|
||||
|
||||
# This sub_minion also connects to master
|
||||
sub_minion_opts = salt.config._read_conf_file(os.path.join(CONF_DIR, 'sub_minion'))
|
||||
|
@ -1026,6 +1028,8 @@ class TestDaemon(object):
|
|||
sub_minion_opts['config_dir'] = TMP_SUB_MINION_CONF_DIR
|
||||
sub_minion_opts['root_dir'] = os.path.join(TMP, 'rootdir-sub-minion')
|
||||
sub_minion_opts['pki_dir'] = os.path.join(TMP, 'rootdir-sub-minion', 'pki', 'minion')
|
||||
sub_minion_opts['hosts.file'] = os.path.join(TMP, 'rootdir', 'hosts')
|
||||
sub_minion_opts['aliases.file'] = os.path.join(TMP, 'rootdir', 'aliases')
|
||||
|
||||
# This is the master of masters
|
||||
syndic_master_opts = salt.config._read_conf_file(os.path.join(CONF_DIR, 'syndic_master'))
|
||||
|
|
|
@ -14,8 +14,6 @@ pidfile: minion.pid
|
|||
|
||||
# module extension
|
||||
test.foo: baz
|
||||
hosts.file: /tmp/salt-tests-tmpdir/hosts
|
||||
aliases.file: /tmp/salt-tests-tmpdir/aliases
|
||||
integration.test: True
|
||||
|
||||
# Grains addons
|
||||
|
|
Loading…
Add table
Reference in a new issue