Fix hosts integration test

This commit is contained in:
twangboy 2016-07-26 16:00:07 -06:00
parent 15a7e98563
commit d7800567f5
3 changed files with 4 additions and 6 deletions

View file

@ -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')

View 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'))

View file

@ -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