mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix integration tests on windows
This commit is contained in:
parent
cb1a0866c7
commit
5bcb27e477
6 changed files with 26 additions and 28 deletions
|
@ -717,13 +717,14 @@ class TestDaemon(object):
|
|||
self.master_process.display_name = 'salt-master'
|
||||
self.minion_process = SaltMinion(self.minion_opts, TMP_CONF_DIR, SCRIPT_DIR)
|
||||
self.minion_process.display_name = 'salt-minion'
|
||||
self.sub_minion_process = SaltMinion(self.sub_minion_opts, TMP_SUB_MINION_CONF_DIR, SCRIPT_DIR)
|
||||
self.sub_minion_process.display_name = 'sub salt-minion'
|
||||
#self.sub_minion_process = SaltMinion(self.sub_minion_opts, TMP_SUB_MINION_CONF_DIR, SCRIPT_DIR)
|
||||
#self.sub_minion_process.display_name = 'sub salt-minion'
|
||||
self.smaster_process = SaltMaster(self.syndic_master_opts, TMP_SYNDIC_MASTER_CONF_DIR, SCRIPT_DIR)
|
||||
self.smaster_process.display_name = 'syndic salt-master'
|
||||
self.syndic_process = SaltSyndic(self.syndic_opts, TMP_SYNDIC_MINION_CONF_DIR, SCRIPT_DIR)
|
||||
self.syndic_process.display_name = 'salt-syndic'
|
||||
for process in (self.master_process, self.minion_process, self.sub_minion_process,
|
||||
#for process in (self.master_process, self.minion_process, self.sub_minion_process,
|
||||
for process in (self.master_process, self.minion_process,
|
||||
self.smaster_process, self.syndic_process):
|
||||
sys.stdout.write(
|
||||
' * {LIGHT_YELLOW}Starting {0} ... {ENDC}'.format(
|
||||
|
@ -978,19 +979,19 @@ class TestDaemon(object):
|
|||
running_tests_user = win32api.GetUserName()
|
||||
else:
|
||||
running_tests_user = pwd.getpwuid(os.getuid()).pw_name
|
||||
master_opts = salt.config._read_conf_file(os.path.join(CONF_DIR, 'master'))
|
||||
master_opts['user'] = running_tests_user
|
||||
|
||||
tests_known_hosts_file = os.path.join(TMP_CONF_DIR, 'salt_ssh_known_hosts')
|
||||
with salt.utils.fopen(tests_known_hosts_file, 'w') as known_hosts:
|
||||
known_hosts.write('')
|
||||
|
||||
master_opts = salt.config._read_conf_file(os.path.join(CONF_DIR, 'master'))
|
||||
master_opts['user'] = running_tests_user
|
||||
master_opts['known_hosts_file'] = tests_known_hosts_file
|
||||
master_opts['conf_dir'] = TMP_CONF_DIR
|
||||
|
||||
minion_config_path = os.path.join(CONF_DIR, 'minion')
|
||||
minion_opts = salt.config._read_conf_file(minion_config_path)
|
||||
minion_opts = salt.config._read_conf_file(os.path.join(CONF_DIR, 'minion'))
|
||||
minion_opts['user'] = running_tests_user
|
||||
minion_opts['conf_dir'] = TMP_CONF_DIR
|
||||
|
||||
minion_opts['root_dir'] = master_opts['root_dir'] = os.path.join(TMP, 'rootdir')
|
||||
|
||||
sub_minion_opts = salt.config._read_conf_file(os.path.join(CONF_DIR, 'sub_minion'))
|
||||
|
@ -1209,7 +1210,7 @@ class TestDaemon(object):
|
|||
'''
|
||||
Kill the minion and master processes
|
||||
'''
|
||||
self.sub_minion_process.terminate()
|
||||
#self.sub_minion_process.terminate()
|
||||
self.minion_process.terminate()
|
||||
self.master_process.terminate()
|
||||
try:
|
||||
|
|
|
@ -5,11 +5,8 @@ publish_port: 64505
|
|||
ret_port: 64506
|
||||
worker_threads: 3
|
||||
root_dir: /tmp/salttest
|
||||
pidfile: masterpid
|
||||
pki_dir: pki
|
||||
cachedir: cache
|
||||
pidfile: master.pid
|
||||
timeout: 3
|
||||
sock_dir: .salt-unix
|
||||
open_mode: True
|
||||
syndic_master: localhost
|
||||
fileserver_list_cache_time: 0
|
||||
|
@ -17,7 +14,7 @@ pillar_opts: True
|
|||
peer:
|
||||
'.*':
|
||||
- 'test.*'
|
||||
log_file: master
|
||||
log_file: master.log
|
||||
log_level_logfile: debug
|
||||
key_logfile: key
|
||||
token_file: /tmp/ksfjhdgiuebfgnkefvsikhfjdgvkjahcsidk
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
# basic config
|
||||
master: localhost
|
||||
master_port: 64506
|
||||
tcp_pub_port: 64512
|
||||
tcp_pull_port: 64513
|
||||
interface: 127.0.0.1
|
||||
root_dir: /tmp/salttest
|
||||
pki_dir: pki
|
||||
id: minion
|
||||
cachedir: cachedir
|
||||
sock_dir: minion_sock
|
||||
#acceptance_wait_time: = 1
|
||||
open_mode: True
|
||||
log_file: minion
|
||||
log_file: minion.log
|
||||
log_level_logfile: debug
|
||||
#loop_interval: 0.05
|
||||
config_dir: /tmp/salt-tests-tmpdir
|
||||
pidfile: minion.pid
|
||||
|
||||
# module extension
|
||||
test.foo: baz
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
# basic config
|
||||
master: localhost
|
||||
master_port: 64506
|
||||
tcp_pub_port: 64510
|
||||
tcp_pull_port: 64511
|
||||
root_dir: /tmp/subsalttest
|
||||
pki_dir: pki
|
||||
id: sub_minion
|
||||
cachedir: cachedir
|
||||
sock_dir: sub_minion_sock
|
||||
id: sub_minion
|
||||
#acceptance_wait_time: 1
|
||||
open_mode: True
|
||||
log_file: sub_minion
|
||||
log_file: sub_minion.log
|
||||
log_level_logfile: debug
|
||||
pidfile: sub_minion.pid
|
||||
|
||||
# module extension
|
||||
test.foo: baz
|
||||
|
@ -33,6 +34,3 @@ grains:
|
|||
- jamie
|
||||
- zoe
|
||||
|
||||
ipc_mode: tcp
|
||||
tcp_pub_port: 64510
|
||||
tcp_pull_port: 64511
|
||||
|
|
|
@ -4,16 +4,16 @@ publish_port: 54505
|
|||
ret_port: 54506
|
||||
worker_threads: 3
|
||||
root_dir: /tmp/saltsyndictest
|
||||
pidfile: syndicmasterpid
|
||||
pidfile: syndic_master.pid
|
||||
pki_dir: pki
|
||||
cachedir: cache
|
||||
timeout: 1
|
||||
sock_dir: .salt-unix-syndic
|
||||
sock_dir: syndic_master_sock
|
||||
open_mode: True
|
||||
order_masters: True
|
||||
fileserver_list_cache_time: 0
|
||||
pillar_opts: True
|
||||
tcp_master_publish_pull: 33305
|
||||
tcp_master_workers: 33306
|
||||
log_file: syndic_master
|
||||
log_file: syndic_master.log
|
||||
log_level_logfile: debug
|
||||
|
|
|
@ -37,6 +37,7 @@ _PKG_TARGETS = {
|
|||
'FreeBSD': ['aalib', 'pth'],
|
||||
'SUSE': ['aalib', 'python-pssh'],
|
||||
'MacOS': ['libpng', 'jpeg'],
|
||||
'Windows': ['firefox', '7zip'],
|
||||
}
|
||||
|
||||
_PKG_TARGETS_32 = {
|
||||
|
|
Loading…
Add table
Reference in a new issue