Browse Source

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
Alex Schultz 10 months ago
parent
commit
a7837c9430
4 changed files with 7 additions and 3 deletions
  1. 1
    0
      elements/os-svc-install/tests/test_os_svc_daemon.py
  2. 1
    1
      tests/base.py
  3. 4
    2
      tox.ini
  4. 1
    0
      zuul.d/layout.yaml

+ 1
- 0
elements/os-svc-install/tests/test_os_svc_daemon.py View File

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

+ 1
- 1
tests/base.py View File

@@ -24,7 +24,7 @@ class ScriptTestBase(base.BaseTestCase):
24 24
         super(ScriptTestBase, self).setUp()
25 25
         self.tmpdir = tempfile.mkdtemp()
26 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 29
     def _stub_script(self, name, contents):
30 30
         filename = os.path.join(self.tmpdir, name)

+ 4
- 2
tox.ini View File

@@ -6,8 +6,10 @@ envlist = py27,pep8
6 6
 [testenv]
7 7
 usedevelop = True
8 8
 install_command = pip install {opts} {packages}
9
-deps = -r{toxinidir}/requirements.txt
10
-       -r{toxinidir}/test-requirements.txt
9
+deps =
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
11 13
 commands=
12 14
     python setup.py testr --slowest --testr-args='{posargs}'
13 15
 

+ 1
- 0
zuul.d/layout.yaml View File

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

Loading…
Cancel
Save