From Roy Golan <rgolan(a)redhat.com>:
Roy Golan has submitted this change and it was merged.
Change subject: packaging: Introduce unit test
......................................................................
packaging: Introduce unit test
Motivation:
Writing setup plugins can be non-trivial tasks as it may handle certain os
scenario, files, external deps that may not exist during the development stage.
Change:
Add a packaging/setup/tests directory with a structure which is
identical to the code you test. e.g
source to test:
packaging/setup/
ovirt_engine_setup/engine_common/database.py
test file:
packaging/setup/tests
ovirt_engine_setup/engine_common/test_database.py
The test added is covering the behaviour of the regular expression that
extracts the key=val from postgres.conf file.
Result:
- Invoke all test from with a script:
automation/packaging-setup-tests.sh
- ovirt jenkins will run it as part of check-patch phase of any patch
Change-Id: I7f931000b91c35f44511b568ccb6cac432e85a06
Bug-Url:
https://bugzilla.redhat.com/1388433
Signed-off-by: Roy Golan <rgolan(a)redhat.com>
---
M Makefile
M automation/check-patch.packages
D automation/check-patch.packages.fc25
A automation/check-patch.packages.fc25
M automation/check-patch.sh
A automation/packaging-setup-tests.sh
A packaging/setup/tests/__init__.py
A packaging/setup/tests/config.py
A packaging/setup/tests/ovirt_engine_setup/__init__.py
A packaging/setup/tests/ovirt_engine_setup/engine_common/__init__.py
A packaging/setup/tests/ovirt_engine_setup/engine_common/test_database.py
11 files changed, 71 insertions(+), 2 deletions(-)
Approvals:
Sandro Bonazzola: Looks good to me, approved
Jenkins CI: Passed CI tests
Roy Golan: Verified
--
To view, visit
https://gerrit.ovirt.org/74316
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7f931000b91c35f44511b568ccb6cac432e85a06
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Gil Shinar <gshinar(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbonazzo(a)redhat.com>
Gerrit-Reviewer: Yedidyah Bar David <didi(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>