Skip to content

Commit

Permalink
upgrade bbtests
Browse files Browse the repository at this point in the history
  • Loading branch information
jancajthaml authored Oct 17, 2021
1 parent 8710a0b commit e41cbf7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion bbtest/helpers/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

def logger():
log = logging.getLogger('bbtest')
log.addHandler(journal.JournaldLogHandler())
log.addHandler(journal.JournalHandler())
log.setLevel(logging.DEBUG)
return log
4 changes: 2 additions & 2 deletions bbtest/helpers/unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions bbtest/steps/orchestration_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ 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)


@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)

Expand Down
4 changes: 2 additions & 2 deletions dev/lifecycle/test
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
2 changes: 1 addition & 1 deletion packaging/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -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}


4 changes: 2 additions & 2 deletions packaging/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# ---------------------------------------------------------------------------- #
# stage 0 bootstrap dependencies

FROM amd64/debian:buster
FROM amd64/debian:sid-slim

COPY packaging/bin/* /opt/artifacts/

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions perf/appliance_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit e41cbf7

Please sign in to comment.