cic-eth: Add sanity checks for emergency shutdown / liveness tests
This commit is contained in:
@@ -29,7 +29,7 @@ def load(check_strs, namespace=default_namespace, rundir='/run', *args, **kwargs
|
||||
checks.append(module)
|
||||
|
||||
for check in checks:
|
||||
r = check.health(args, kwargs)
|
||||
r = check.health(*args, **kwargs)
|
||||
if r == False:
|
||||
raise RuntimeError('liveness check {} failed'.format(str(check)))
|
||||
logg.info('liveness check passed: {}'.format(str(check)))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from setuptools import setup
|
||||
setup(
|
||||
name='liveness',
|
||||
version='0.0.1a6',
|
||||
version='0.0.1a7',
|
||||
packages=['liveness'],
|
||||
include_package_data=True,
|
||||
)
|
||||
|
||||
@@ -116,7 +116,9 @@ class TestImports(unittest.TestCase):
|
||||
|
||||
def test_args(self):
|
||||
checks = ['tests.imports.import_args']
|
||||
liveness.linux.load(checks, namespace=self.unit, rundir=self.run_dir, args=['foo'], kwargs={'bar': 42})
|
||||
aargs=['foo']
|
||||
kwaargs={'bar': 42}
|
||||
liveness.linux.load(checks, self.unit, self.run_dir, *aargs, **kwaargs)
|
||||
f = open(self.pid_path, 'r')
|
||||
r = f.read()
|
||||
f.close()
|
||||
|
||||
Reference in New Issue
Block a user