Add python jobs to tripleo-image-elements

This change also fixes the python tests to properly mock the path so our
stubs work if the command already exists on the system path.

Change-Id: I7c54b1d99e7cf6c4e3f4ded8c518bf447b2ba1de
This commit is contained in:
Alex Schultz 2018-05-31 09:51:52 -06:00
parent 5d9038c568
commit a7837c9430
4 changed files with 7 additions and 3 deletions

View File

@ -177,6 +177,7 @@ end script
output = self._run_command(
['elements/os-svc-install/bin/os-svc-daemon',
'-p',
'-l',
'-n', 'foo',
'-u', 'foo',
'-e', 'foo=bar',

View File

@ -24,7 +24,7 @@ class ScriptTestBase(base.BaseTestCase):
super(ScriptTestBase, self).setUp()
self.tmpdir = tempfile.mkdtemp()
self.env = os.environ.copy()
self.env['PATH'] = self.env['PATH'] + ':' + self.tmpdir
self.env['PATH'] = self.tmpdir + ':' + self.env['PATH']
def _stub_script(self, name, contents):
filename = os.path.join(self.tmpdir, name)

View File

@ -6,8 +6,10 @@ envlist = py27,pep8
[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands=
python setup.py testr --slowest --testr-args='{posargs}'

View File

@ -1,5 +1,6 @@
- project:
templates:
- openstack-python-jobs
- tripleo-multinode-baremetal-minimal
- tripleo-multinode-container-minimal