diff --git a/bbtest/helpers/logger.py b/bbtest/helpers/logger.py index bf11c26a..f9dbca5c 100644 --- a/bbtest/helpers/logger.py +++ b/bbtest/helpers/logger.py @@ -7,6 +7,6 @@ def logger(): log = logging.getLogger('bbtest') - log.addHandler(journal.JournaldLogHandler()) + log.addHandler(journal.JournalHandler()) log.setLevel(logging.DEBUG) return log \ No newline at end of file diff --git a/bbtest/helpers/unit.py b/bbtest/helpers/unit.py index e5538efb..84e38415 100644 --- a/bbtest/helpers/unit.py +++ b/bbtest/helpers/unit.py @@ -161,7 +161,7 @@ def teardown(self): self.collect_logs() def __get_systemd_units(self): - (code, result, error) = execute(['systemctl', 'list-units', '--no-legend']) - result = [item.split(' ')[0].strip() for item in result.split(os.linesep)] + (code, result, error) = execute(['systemctl', 'list-units', '--all', '--no-legend']) + result = [item.replace('*', '').strip().split(' ')[0].strip() for item in result.split(os.linesep)] result = [item for item in result if "vault" in item and not item.endswith('unit.slice')] return result diff --git a/bbtest/steps/orchestration_steps.py b/bbtest/steps/orchestration_steps.py index dcb8fee4..9be5b9af 100644 --- a/bbtest/steps/orchestration_steps.py +++ b/bbtest/steps/orchestration_steps.py @@ -28,12 +28,12 @@ def step_impl(context, package, operation): @given('systemctl contains following active units') @then('systemctl contains following active units') def step_impl(context): - (code, result, error) = execute(["systemctl", "list-units", "--no-legend", "--state=active"]) + (code, result, error) = execute(["systemctl", "list-units", "--all", "--no-legend", "--state=active"]) assert code == 0, str(result) + ' ' + str(error) items = [] for row in context.table: items.append(row['name'] + '.' + row['type']) - result = [item.split(' ')[0].strip() for item in result.split(os.linesep)] + result = [item.replace('*', '').strip().split(' ')[0].strip() for item in result.split(os.linesep)] result = [item for item in result if item in items] assert len(result) > 0, 'units not found\n{}'.format(result) @@ -41,12 +41,12 @@ def step_impl(context): @given('systemctl does not contain following active units') @then('systemctl does not contain following active units') def step_impl(context): - (code, result, error) = execute(["systemctl", "list-units", "--no-legend", "--state=active"]) + (code, result, error) = execute(["systemctl", "list-units", "--all", "--no-legend", "--state=active"]) assert code == 0, str(result) + ' ' + str(error) items = [] for row in context.table: items.append(row['name'] + '.' + row['type']) - result = [item.split(' ')[0].strip() for item in result.split(os.linesep)] + result = [item.replace('*', '').strip().split(' ')[0].strip() for item in result.split(os.linesep)] result = [item for item in result if item in items] assert len(result) == 0, 'units found\n{}'.format(result) diff --git a/dev/lifecycle/test b/dev/lifecycle/test index 70cb2d10..70bcc784 100755 --- a/dev/lifecycle/test +++ b/dev/lifecycle/test @@ -38,8 +38,8 @@ lifecycle::go::test() { local output="$2" local target=$(basename $dir) - coverage_out=$(tempfile) - test_out=$(tempfile) + coverage_out=$(mktemp) + test_out=$(mktemp) mkdir -p ${output} diff --git a/packaging/debian/control b/packaging/debian/control index acd91ab9..e04dd064 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -9,6 +9,6 @@ Package: vault Architecture: any Description: account vault for openbank Service holding accounts journal for OpenBank services. -Depends: libzmq5 (>= 4.3.1~), libzmq5 (<< 4.3.2~), openssl (>= 1.1~), ${shlibs:Depends} +Depends: libzmq5 (>= 4.3~), libzmq5 (<< 4.4~), openssl (>= 1.1~), ${shlibs:Depends} diff --git a/packaging/docker/Dockerfile b/packaging/docker/Dockerfile index 3924f18e..5aae0da2 100644 --- a/packaging/docker/Dockerfile +++ b/packaging/docker/Dockerfile @@ -15,7 +15,7 @@ # ---------------------------------------------------------------------------- # # stage 0 bootstrap dependencies -FROM amd64/debian:buster +FROM amd64/debian:sid-slim COPY packaging/bin/* /opt/artifacts/ @@ -28,7 +28,7 @@ RUN find /opt/artifacts -name vault_*_amd64.deb | xargs -I{} -tx apt-get install # ---------------------------------------------------------------------------- # # stage 1 link files -FROM amd64/debian:buster +FROM amd64/debian:sid-slim COPY --from=0 /opt/artifacts /opt/artifacts diff --git a/perf/appliance_manager.py b/perf/appliance_manager.py index c9bdee4c..f7f0056c 100644 --- a/perf/appliance_manager.py +++ b/perf/appliance_manager.py @@ -41,13 +41,13 @@ def __install(self, filename): raise RuntimeError('code: {}, stdout: [{}], stderr: [{}]'.format(code, result, error)) (code, result, error) = execute([ - "systemctl", "-t", "service", "--no-legend" + "systemctl", "-t", "service", "--all", "--no-legend" ]) if code != 0: raise RuntimeError('code: {}, stdout: [{}], stderr: [{}]'.format(code, result, error)) - self.services = set([x.split(' ')[0].split('@')[0].split('.service')[0] for x in result.splitlines()]) + self.services = set([item.replace('*', '').strip().split(' ')[0].split('@')[0].split('.service')[0] for item in result.split(os.linesep)]) def __download(self):