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 b15e5e0 commit a88e85b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 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 @@ -165,7 +165,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 "fio-bco" 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 @@ -29,25 +29,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,4 +9,4 @@ Package: fio-bco
Architecture: any
Description: fio bank connector for openbank
Service managing FioBank tokens and synchronizing FioBank transactions.
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 fio-bco_*_amd64.deb | xargs -I{} -tx apt-get insta
# ---------------------------------------------------------------------------- #
# stage 1 link files

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

COPY --from=0 /opt/artifacts /opt/artifacts

Expand Down

0 comments on commit a88e85b

Please sign in to comment.