Skip to content

tests: focal caplog has whitespace indentation for multi-line logs#1201

Merged
TheRealFalcon merged 1 commit into
canonical:mainfrom
blackboxsw:tests-focal-fix-log-whitespace
Jan 20, 2022
Merged

tests: focal caplog has whitespace indentation for multi-line logs#1201
TheRealFalcon merged 1 commit into
canonical:mainfrom
blackboxsw:tests-focal-fix-log-whitespace

Conversation

@blackboxsw
Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw commented Jan 19, 2022

Avoid series-specific log formatting in tests by using
caplog.record_tuples.

Added benefit, we can easily check log-level WARNING too.

Fixes unit test failures from Focal Package builds at:
https://code.launchpad.net/~cloud-init-dev/+archive/ubuntu/daily/+build/23076508

Proposed Commit Message

Avoid series-specific log formatting in tests by using
caplog.record_tuples.

Added benefit, we can easily check log-level WARNING too.

Fixes unit test failures from Focal Package builds at:
https://code.launchpad.net/~cloud-init-dev/+archive/ubuntu/daily/\
  +build/23076508

Additional Context

Test Steps

git checkout upstream/focal
get merge tests-focal-fix-log-whitespace
build-package
sbuild --resolve-alternatives --dist=focal --arch=amd64  --arch-all ../out/cloud-init_21.4-0ubuntu1~20.04.1.dsc
# build should succeed instead of failing in unit tests

Checklist:

  • My code follows the process laid out in the documentation
  • I have updated or added any unit tests accordingly
  • I have updated or added any documentation accordingly

Avoid series-specific log formatting in tests by using
caplog.record_tuples.

Added benefit, we can easily check log-level WARNING too.

Fixes unit tests from Focal Package builds at:
https://code.launchpad.net/~cloud-init-dev/+archive/ubuntu/daily/\
  +build/23076508
@blackboxsw blackboxsw force-pushed the tests-focal-fix-log-whitespace branch from 651d6a0 to d550ee8 Compare January 19, 2022 23:55
@holmanb
Copy link
Copy Markdown
Member

holmanb commented Jan 20, 2022

LGTM

@blackboxsw blackboxsw requested review from TheRealFalcon and holmanb and removed request for holmanb January 20, 2022 01:30
@TheRealFalcon TheRealFalcon merged commit 7807937 into canonical:main Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants