Skip systemctl functional tests when systemd is not running
Change-Id: I4c1b61ebf34d8df4e53799151f33465096f33f79
This commit is contained in:
parent
9876ce03d9
commit
49376a1bc2
@ -52,7 +52,7 @@ repos:
|
||||
hooks:
|
||||
- id: pylint
|
||||
name: pylint
|
||||
entry: pylint --max-line-length=88 -E -e W,E -d unused-import,broad-except,fixme,unspecified-encoding,redundant-u-string-prefix
|
||||
entry: .tox/pep8/bin/pylint --max-line-length=88 -E -e W,E -d unused-import,broad-except,fixme,unspecified-encoding,redundant-u-string-prefix
|
||||
files: ^tobiko/
|
||||
language: system
|
||||
types: [python]
|
||||
|
@ -25,9 +25,9 @@ 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}")
|
||||
sh.execute('pgrep systemd')
|
||||
except sh.ShellCommandFailed:
|
||||
self.skipTest("systemd is not running")
|
||||
|
||||
def test_list_system_services(self):
|
||||
units = sh.list_systemd_units()
|
||||
|
@ -47,7 +47,7 @@
|
||||
name: tobiko-docker-infrared
|
||||
description: |
|
||||
Run functional tests for an OpenStack Python project inside a Docker container.
|
||||
voting: false
|
||||
voting: true
|
||||
parent: tobiko-docker-unit
|
||||
timeout: 3600
|
||||
vars:
|
||||
|
Loading…
Reference in New Issue
Block a user