Merge ~smoser/cloud-init:bug/1703697-python3.6-ubuntu into cloud-init:master
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Merged at revision: | 865e941f3f88c7daeafbf1eab856e02ce2b6a5f7 | ||||
| Proposed branch: | ~smoser/cloud-init:bug/1703697-python3.6-ubuntu | ||||
| Merge into: | cloud-init:master | ||||
| Diff against target: |
178 lines (+34/-38) 4 files modified
cloudinit/net/netplan.py (+2/-1) tests/unittests/helpers.py (+20/-1) tests/unittests/test_distros/test_create_users.py (+12/-18) tests/unittests/test_runs/test_simple_run.py (+0/-18) |
||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Chad Smith | 2017-07-13 | Approve on 2017-07-18 | |
| Server Team CI bot | continuous-integration | Approve on 2017-07-18 | |
| Joshua Powers (community) | Approve on 2017-07-13 | ||
|
Review via email:
|
|||
Commit Message
tests: fixes for issues uncovered when moving to python3.6
This includes a few fixes found when testing with python 3.6.
- fix eni renderer when target is None
This just uses the util.target_path() in the event that target is None.
- change test cases to not rely on the cached result of util.get_cmdline()
and update the base TestCase to unset that cache.
- mock calls to system_is_snappy from the create_users test cases.
- drop unused _pp_root in test_simple_run.py
LP: #1703697
| Michael Hudson-Doyle (mwhudson) wrote : | # |
Now I've fixed the python-json-patch thing, this patch is all that's needed to get cloud-init building with python 3.6 as default.
| Scott Moser (smoser) wrote : | # |
We still need one more fix in cloud-init.
test_simple_run.py has some side effects, and makes test_create_
This was found when looking at bug 1704024. It seems that python 3.6 ends
up iterating through tests in a different order than 3.5.
$ python3 -m nose tests/unittests
..........
-------
Ran 10 tests in 0.065s
OK
$ python3 -m nose tests/unittests
=======
FAIL: test_basic (tests.
-------
Traceback (most recent call last):
File "/usr/lib/
return func(*args, **keywargs)
File "/home/
mock.
AssertionError: [call([
-------
cloudinit.util: DEBUG: Reading from /etc/os-release (quiet=True)
cloudinit.util: DEBUG: Read 407 bytes from /etc/os-release
cloudinit.util: DEBUG: Reading from /proc/1/cmdline (quiet=False)
cloudinit.util: DEBUG: Read 47 bytes from /proc/1/cmdline
cloudinit.util: DEBUG: Reading from /etc/system-
cloudinit.util: DEBUG: Read 0 bytes from /etc/system-
cloudinit.distros: DEBUG: Adding user foouser
-------
-------
Ran 9 tests in 0.023s
FAILED (failures=1)
- 2c60ffb... by Scott Moser on 2017-07-17
PASSED: Continuous integration, rev:c2145d3b0f1
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: CentOS 6 & 7: Build & Test
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:895856e7412
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: CentOS 6 & 7: Build & Test
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
- 008de1d... by Scott Moser on 2017-07-17
- 5837847... by Scott Moser on 2017-07-17
PASSED: Continuous integration, rev:7ac6f05b6ca
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: CentOS 6 & 7: Build & Test
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:c392b94fde1
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: CentOS 6 & 7: Build & Test
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:5837847479f
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: CentOS 6 & 7: Build & Test
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
| Chad Smith (chad.smith) wrote : | # |
Good fixes, when I got the stale env out of my way all looks good. Thanks for the cleanup of the patch decorator at the top of the class instead of all the repeated patch declarations per unit test.


PASSED: Continuous integration, rev:22f7dc62e99 d51d1f3f4185985 141841de4d11db /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 38/
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: CentOS 6 & 7: Build & Test
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 38/rebuild
https:/