Merge ~smoser/cloud-init:bug/1635350-tests-read-cfg.d into cloud-init:master
Proposed by
Scott Moser
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 1e55f4127f356b930e2c1ad36dcb6bed24f3beb2 | ||||
Proposed branch: | ~smoser/cloud-init:bug/1635350-tests-read-cfg.d | ||||
Merge into: | cloud-init:master | ||||
Diff against target: |
181 lines (+23/-30) 2 files modified
tests/unittests/helpers.py (+8/-0) tests/unittests/test_data.py (+15/-30) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Joshua Powers (community) | Approve | ||
cloud-init Commiters | Pending | ||
Review via email:
|
Commit message
unittests: do not read system /etc/cloud/
Many of the unit tests in test_data would inadvertantly read the
system's /etc/cloud/
This was first noticed on a system deployed by MAAS, where
files in /etc/cloud/
This changes those tests to actually make use of
FilesystemMocki
class which is easier to use for at least this use case.
LP: #1635350
To post a comment you must log in.
Can confirm this merge request fixes the issue that I was seeing. I can now build as a non-root user as expected.