Skip to content

Commit

Permalink
Remove unnedeed config test (#34751)
Browse files Browse the repository at this point in the history
Refs #34607
  • Loading branch information
Mike Place authored and Nicole Thomas committed Jul 18, 2016
1 parent f19caac commit 10a1af9
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions tests/unit/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Import Salt Testing libs
from salttesting import TestCase
from salttesting.mock import MagicMock, patch
from salttesting.helpers import ensure_in_syspath, TestsLoggingHandler
from salttesting.helpers import ensure_in_syspath
from salt.exceptions import CommandExecutionError

ensure_in_syspath('../')
Expand Down Expand Up @@ -364,34 +364,6 @@ def test_syndic_config(self):
self.assertEqual(syndic_opts['_master_conf_file'], minion_conf_path)
self.assertEqual(syndic_opts['_minion_conf_file'], syndic_conf_path)

def test_issue_6714_parsing_errors_logged(self):
try:
tempdir = tempfile.mkdtemp(dir=integration.SYS_TMP_DIR)
test_config = os.path.join(tempdir, 'config')

# Let's populate a master configuration file with some basic
# settings
salt.utils.fopen(test_config, 'w').write(
'root_dir: {0}\n'
'log_file: {0}/foo.log\n'.format(tempdir) +
'\n\n\n'
'blah:false\n'
)

with TestsLoggingHandler() as handler:
# Let's load the configuration
config = sconfig.master_config(test_config)
for message in handler.messages:
if message.startswith('ERROR:Error parsing configuration'):
break
else:
raise AssertionError(
'No parsing error message was logged'
)
finally:
if os.path.isdir(tempdir):
shutil.rmtree(tempdir)

@patch('salt.utils.network.get_fqhostname', MagicMock(return_value='localhost'))
def test_get_id_etc_hostname(self):
'''
Expand Down

0 comments on commit 10a1af9

Please sign in to comment.