Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnedeed config test #34739

Merged
merged 1 commit into from
Jul 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions tests/unit/config/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