Merge lp://qastaging/~chad.smith/curtin/common-ci-test-case into lp://qastaging/~curtin-dev/curtin/trunk
Status: | Merged |
---|---|
Merged at revision: | 519 |
Proposed branch: | lp://qastaging/~chad.smith/curtin/common-ci-test-case |
Merge into: | lp://qastaging/~curtin-dev/curtin/trunk |
Diff against target: |
1483 lines (+247/-347) 24 files modified
tests/unittests/helpers.py (+36/-0) tests/unittests/test_apt_custom_sources_list.py (+3/-6) tests/unittests/test_apt_source.py (+4/-7) tests/unittests/test_basic.py (+4/-4) tests/unittests/test_block.py (+20/-36) tests/unittests/test_block_iscsi.py (+6/-18) tests/unittests/test_block_lvm.py (+2/-2) tests/unittests/test_block_mdadm.py (+10/-22) tests/unittests/test_block_mkfs.py (+2/-2) tests/unittests/test_clear_holders.py (+5/-5) tests/unittests/test_commands_apply_net.py (+8/-20) tests/unittests/test_commands_block_meta.py (+6/-19) tests/unittests/test_commands_install.py (+4/-4) tests/unittests/test_config.py (+6/-6) tests/unittests/test_curthooks.py (+21/-46) tests/unittests/test_feature.py (+2/-2) tests/unittests/test_gpg.py (+4/-4) tests/unittests/test_make_dname.py (+4/-4) tests/unittests/test_net.py (+8/-14) tests/unittests/test_partitioning.py (+4/-3) tests/unittests/test_public.py (+4/-4) tests/unittests/test_reporter.py (+29/-38) tests/unittests/test_util.py (+48/-62) tests/unittests/test_version.py (+7/-19) |
To merge this branch: | bzr merge lp://qastaging/~chad.smith/curtin/common-ci-test-case |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
curtin developers | Pending | ||
Review via email:
|
Commit message
tests: Add CiTestCase common parent for all curtin tests
This branch makes sure all unittests subclass from CiTestCase which provides all unit tests with an add_patch method for mocking as well as tmp_dir and tmp_path creation.
Drop any unittest-specific tempfile setup in favor of self.tmp_dir and self.tmp_path.
Also drop any duplicate add_patch method definitions and convert any mock start/stop logic to add_patch where possible.
Description of the change
tests: Add CiTestCase common parent for all curtin tests
This branch makes sure all unittests subclass from CiTestCase which provides all unit tests with an add_patch method for mocking as well as tmp_dir and tmp_path creation.
Drop any unittest-specific tempfile setup in favor of self.tmp_dir and self.tmp_path.
Also drop any duplicate add_patch method definitions and convert any mock start/stop logic to add_patch where possible.
PASSED: Continuous integration, rev:517 /jenkins. ubuntu. com/server/ job/curtin- ci/580/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-amd64/ 580 /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-arm64/ 580 /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-ppc64el/ 580 /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-s390x/ 580 /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= vm-i386/ 580
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/curtin- ci/580/ rebuild
https:/