[virt-tools-list] [virt-bootstrap] [PATCH v4 00/13] Unit tests
Radostin Stoyanov
rstoyanov1 at gmail.com
Fri Jul 21 12:13:16 UTC 2017
This is revised version of the patch series which aim
to add the changes mentioned below and a test suite with unit tests.
1. Fix incompatibility with string handling for Python3.
2. Specify logger name when `virt_bootstrap.py` is executed.
3. Add support for Manifest version 1 of Docker registry.
4. Drop the need of root privileges to set root password inside rootfs.
5. Implement UID/GID mapping for files extracted from container image.
Coverage report of the test suite:
Name Stmts Miss Cover Missing
-------------------------------------------------------------------
src/virtBootstrap/__init__.py 2 0 100%
src/virtBootstrap/progress.py 19 0 100%
src/virtBootstrap/sources.py 139 3 98% 215, 243-244
src/virtBootstrap/utils.py 173 0 100%
src/virtBootstrap/virt_bootstrap.py 142 43 70% 32-33, 46-53, 227-308, 312
-------------------------------------------------------------------
TOTAL 475 46 90%
Commits (13):
Python 3/2 compatibility: Convert Byte-str to Str
Specify logger name when executed directly
DockerSource: Add support for Manifest version 1
Drop need of root privileges to set root password
Add remapping ownership of files in rootfs
Update argument helpers
tests: Add test suite
tests: Add unit tests for 'virt_bootstrap' module
tests: Add unit tests for DockerSource
tests: Add unit tests for FileSource
tests: Add unit tests for "progress" module
tests: Add unit tests for the "utils" module
readme: Fix typo
README.md | 14 +-
setup.py | 10 +-
src/virtBootstrap/sources.py | 18 +-
src/virtBootstrap/utils.py | 55 +++-
src/virtBootstrap/virt_bootstrap.py | 136 ++++++--
tests/__init__.py | 42 +++
tests/test_docker_source.py | 605 ++++++++++++++++++++++++++++++++++
tests/test_file_source.py | 174 ++++++++++
tests/test_progress.py | 115 +++++++
tests/test_utils.py | 640 ++++++++++++++++++++++++++++++++++++
tests/test_virt_bootstrap.py | 464 ++++++++++++++++++++++++++
11 files changed, 2238 insertions(+), 35 deletions(-)
create mode 100644 tests/__init__.py
create mode 100644 tests/test_docker_source.py
create mode 100644 tests/test_file_source.py
create mode 100644 tests/test_progress.py
create mode 100644 tests/test_utils.py
create mode 100644 tests/test_virt_bootstrap.py
--
2.9.4
More information about the virt-tools-list
mailing list