Fix integration.states.test_pip.PipStateTest.test_pip_installed_weird_install

Carbon 1.1.1 for some reason added six to their setup.py, which breaks
this test since it's not installed into the virtualenv. This PR forces
this test to use a version of carbon which does not dep on six in its
setup.py.
This commit is contained in:
Erik Johnson 2017-12-19 18:37:59 -06:00 committed by rallytime
parent 324b7d4058
commit 80b6bd6813
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19
2 changed files with 5 additions and 5 deletions

View file

@ -29,7 +29,7 @@ setup_test_virtualenv:
carbon-weird-setup:
pip.installed:
- name: carbon
- name: 'carbon < 1.1'
- no_deps: True
- bin_env: {{ virtualenv_test }}
- onchanges:

View file

@ -121,19 +121,19 @@ class PipStateTest(integration.ModuleCase, integration.SaltReturnAssertsMixIn):
# some of the state return parts
for key in six.iterkeys(ret):
self.assertTrue(ret[key]['result'])
if ret[key]['name'] != 'carbon':
if ret[key]['name'] != 'carbon < 1.1':
continue
self.assertEqual(
ret[key]['comment'],
'There was no error installing package \'carbon\' '
'There was no error installing package \'carbon < 1.1\' '
'although it does not show when calling \'pip.freeze\'.'
)
break
else:
raise Exception('Expected state did not run')
finally:
if os.path.isdir('/opt/graphite'):
shutil.rmtree('/opt/graphite')
if os.path.isdir(ographite):
shutil.rmtree(ographite)
def test_issue_2028_pip_installed_state(self):
ret = self.run_function('state.sls', mods='issue-2028-pip-installed')