summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Schultz <aschultz@redhat.com>2018-05-31 09:51:52 -0600
committerAlex Schultz <aschultz@redhat.com>2018-05-31 10:50:16 -0600
commita7837c9430efbe5fae64afb9107bbbd17644b7a5 (patch)
treead4fdd616b43383a7c3403615477488b352fa656
parent5d9038c56805055018d0573b038bf65bc9b14393 (diff)
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
Notes
Notes (review): Verified+1: RDO Third Party CI <dmsimard+rdothirdparty@redhat.com> Code-Review+2: Emilien Macchi <emilien@redhat.com> Code-Review+2: James Slagle <jslagle@redhat.com> Workflow+1: James Slagle <jslagle@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 01 Jun 2018 01:17:29 +0000 Reviewed-on: https://review.openstack.org/571512 Project: openstack/tripleo-image-elements Branch: refs/heads/master
-rw-r--r--elements/os-svc-install/tests/test_os_svc_daemon.py1
-rw-r--r--tests/base.py2
-rw-r--r--tox.ini6
-rw-r--r--zuul.d/layout.yaml1
4 files changed, 7 insertions, 3 deletions
diff --git a/elements/os-svc-install/tests/test_os_svc_daemon.py b/elements/os-svc-install/tests/test_os_svc_daemon.py
index 5a439b7..72aad85 100644
--- a/elements/os-svc-install/tests/test_os_svc_daemon.py
+++ b/elements/os-svc-install/tests/test_os_svc_daemon.py
@@ -177,6 +177,7 @@ end script
177 output = self._run_command( 177 output = self._run_command(
178 ['elements/os-svc-install/bin/os-svc-daemon', 178 ['elements/os-svc-install/bin/os-svc-daemon',
179 '-p', 179 '-p',
180 '-l',
180 '-n', 'foo', 181 '-n', 'foo',
181 '-u', 'foo', 182 '-u', 'foo',
182 '-e', 'foo=bar', 183 '-e', 'foo=bar',
diff --git a/tests/base.py b/tests/base.py
index b4d49f6..d0e04d8 100644
--- a/tests/base.py
+++ b/tests/base.py
@@ -24,7 +24,7 @@ class ScriptTestBase(base.BaseTestCase):
24 super(ScriptTestBase, self).setUp() 24 super(ScriptTestBase, self).setUp()
25 self.tmpdir = tempfile.mkdtemp() 25 self.tmpdir = tempfile.mkdtemp()
26 self.env = os.environ.copy() 26 self.env = os.environ.copy()
27 self.env['PATH'] = self.env['PATH'] + ':' + self.tmpdir 27 self.env['PATH'] = self.tmpdir + ':' + self.env['PATH']
28 28
29 def _stub_script(self, name, contents): 29 def _stub_script(self, name, contents):
30 filename = os.path.join(self.tmpdir, name) 30 filename = os.path.join(self.tmpdir, name)
diff --git a/tox.ini b/tox.ini
index 0ac2f6c..4caaa75 100644
--- a/tox.ini
+++ b/tox.ini
@@ -6,8 +6,10 @@ envlist = py27,pep8
6[testenv] 6[testenv]
7usedevelop = True 7usedevelop = True
8install_command = pip install {opts} {packages} 8install_command = pip install {opts} {packages}
9deps = -r{toxinidir}/requirements.txt 9deps =
10 -r{toxinidir}/test-requirements.txt 10 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
11 -r{toxinidir}/requirements.txt
12 -r{toxinidir}/test-requirements.txt
11commands= 13commands=
12 python setup.py testr --slowest --testr-args='{posargs}' 14 python setup.py testr --slowest --testr-args='{posargs}'
13 15
diff --git a/zuul.d/layout.yaml b/zuul.d/layout.yaml
index 18c3aa4..afc4f70 100644
--- a/zuul.d/layout.yaml
+++ b/zuul.d/layout.yaml
@@ -1,5 +1,6 @@
1 1
2- project: 2- project:
3 templates: 3 templates:
4 - openstack-python-jobs
4 - tripleo-multinode-baremetal-minimal 5 - tripleo-multinode-baremetal-minimal
5 - tripleo-multinode-container-minimal 6 - tripleo-multinode-container-minimal