Merge "Skip test when systemctl command is not available"
This commit is contained in:
commit
601b25e8a6
|
@ -22,6 +22,13 @@ from tobiko.shell import sh
|
||||||
|
|
||||||
class TestSystemctl(testtools.TestCase):
|
class TestSystemctl(testtools.TestCase):
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
super().setUp()
|
||||||
|
try:
|
||||||
|
sh.execute('systemctl --version')
|
||||||
|
except sh.ShellCommandFailed as ex:
|
||||||
|
self.skipTest(f"Can't execute systemctl: {ex.stderr}")
|
||||||
|
|
||||||
def test_list_system_services(self):
|
def test_list_system_services(self):
|
||||||
units = sh.list_systemd_units()
|
units = sh.list_systemd_units()
|
||||||
self.assertNotEqual([], units)
|
self.assertNotEqual([], units)
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
jobs:
|
jobs:
|
||||||
- tobiko-docker-unit
|
- tobiko-docker-unit
|
||||||
- tobiko-docker-functional
|
- tobiko-docker-functional
|
||||||
gate:
|
gate: *CHECK
|
||||||
jobs:
|
|
||||||
- tobiko-docker-unit
|
|
||||||
periodic: *CHECK
|
periodic: *CHECK
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,7 +32,7 @@
|
||||||
name: tobiko-docker-functional
|
name: tobiko-docker-functional
|
||||||
description: |
|
description: |
|
||||||
Run functional tests for an OpenStack Python project inside a Docker container.
|
Run functional tests for an OpenStack Python project inside a Docker container.
|
||||||
voting: false
|
voting: true
|
||||||
parent: tobiko-docker-unit
|
parent: tobiko-docker-unit
|
||||||
timeout: 3600
|
timeout: 3600
|
||||||
vars:
|
vars:
|
||||||
|
|
Loading…
Reference in New Issue