[virt-tools-list] [virt-bootstrap] [PATCH v3 00/12] Unit tests
Radostin Stoyanov
rstoyanov1 at gmail.com
Thu Jul 20 11:29:35 UTC 2017
This patch series adds test suite with unit tests
and applies the following changes:
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. Replace chpasswd with script to avoid requirement for
root privileges.
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 110 46 58% 32-33, 46-53, 137-138, 163-245, 249-250
-------------------------------------------------------------------
TOTAL 443 49 89%
Commits (12):
Python 3/2 compatibility: Convert Byte-str to Str
Specify logger name when executed directly
DockerSource: Add support for Manifest version 1
set_root_password: Replace chpasswd with script
bootstrap: Implement UID/GID mapping
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 | 2 +-
setup.py | 10 +-
src/virtBootstrap/sources.py | 18 +-
src/virtBootstrap/utils.py | 55 +++-
src/virtBootstrap/virt_bootstrap.py | 58 +++-
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 | 287 ++++++++++++++++
11 files changed, 1979 insertions(+), 27 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