Skip to content

Commit

Permalink
clean up files before running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thatch45 committed Mar 28, 2012
1 parent 118c028 commit 7d005f9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/integration/__init__.py
@@ -1,7 +1,14 @@
'''
Set up the Salt integration test suite
'''

# Import Python libs
import multiprocessing
import os
import shutil
import signal

# Import Salt libs
import salt
import salt.config
import salt.master
Expand All @@ -27,6 +34,9 @@ def __enter__(self):
os.path.join(INTEGRATION_TEST_DIR, 'files/conf/master'))
self.minion_opts = salt.config.minion_config(
os.path.join(INTEGRATION_TEST_DIR, 'files/conf/minion'))
# clean up the old files
if os.path.isdir(self.master_opts['root_dir']):
shutil.rmtree(self.master_opts['root_dir'])
self.master_opts['file_roots'] = FILES
self.master_opts['hosts.file'] = os.path.join(TMP, 'hosts')
self.minion_opts['file_roots'] = FILES
Expand Down

0 comments on commit 7d005f9

Please sign in to comment.