Merge ~chad.smith/cloud-init:skip-jsonschema-unittest-when-missing-deps into cloud-init:master
Proposed by
Chad Smith
on 2017-06-02
| Status: | Merged |
|---|---|
| Approved by: | Scott Moser on 2017-06-02 |
| Approved revision: | 9b893f87bb936423b2e0d762fd857a8a7d15cfa5 |
| Merged at revision: | a62a94b4edd7c61a268350c84e43b0aa8f68b0c2 |
| Proposed branch: | ~chad.smith/cloud-init:skip-jsonschema-unittest-when-missing-deps |
| Merge into: | cloud-init:master |
| Diff against target: |
134 lines (+25/-4) 2 files modified
tests/unittests/test_handler/test_handler_ntp.py (+11/-1) tests/unittests/test_handler/test_schema.py (+14/-3) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Joshua Powers (community) | Approve on 2017-06-02 | ||
| cloud-init commiters | 2017-06-02 | Pending | |
|
Review via email:
|
|||
Description of the Change
Tests: Skip jsonschema related unit tests when dependency is absent.
On some build environments we don't have python-jsonschema installed. Since this dependency is an optional runtime dependency, we can also make it an optional unit test dependency. Add a skip of related unittests when jsonschema is not present.
Also, KeyError messages on CentOs don't have single quotes around the missing 'key-name'. Make our KeyError assertion a bit more flexible with the assertIn call.
LP: #1695318
To post a comment you must log in.


LGTM passes tox locally and in my centos6 container.