Merge ~raharper/cloud-init:cloud-test-add-pylint-and-fix into cloud-init:master
| Status: | Merged |
|---|---|
| Merged at revision: | a110e483e8644ab73e69853ea11b6c4c6cfa04b6 |
| Proposed branch: | ~raharper/cloud-init:cloud-test-add-pylint-and-fix |
| Merge into: | cloud-init:master |
| Diff against target: |
884 lines (+121/-266) 29 files modified
.pylintrc (+1/-1) cloudinit/cmd/tests/test_clean.py (+1/-1) cloudinit/cmd/tests/test_status.py (+1/-1) cloudinit/tests/helpers.py (+35/-0) dev/null (+0/-172) tests/cloud_tests/__init__.py (+6/-0) tests/cloud_tests/bddeb.py (+4/-5) tests/cloud_tests/collect.py (+3/-3) tests/cloud_tests/config.py (+3/-1) tests/cloud_tests/testcases/base.py (+2/-1) tests/cloud_tests/testcases/modules/set_hostname_fqdn.py (+1/-1) tests/cloud_tests/util.py (+1/-1) tests/unittests/test_cs_util.py (+1/-0) tests/unittests/test_datasource/test_azure.py (+14/-17) tests/unittests/test_datasource/test_digitalocean.py (+6/-3) tests/unittests/test_datasource/test_ec2.py (+2/-1) tests/unittests/test_distros/test_create_users.py (+5/-2) tests/unittests/test_distros/test_netconfig.py (+0/-3) tests/unittests/test_handler/test_handler_lxd.py (+0/-3) tests/unittests/test_handler/test_handler_power_state.py (+0/-3) tests/unittests/test_handler/test_handler_yum_add_repo.py (+2/-8) tests/unittests/test_handler/test_handler_zypper_add_repo.py (+1/-6) tests/unittests/test_reporting.py (+1/-1) tests/unittests/test_templating.py (+1/-1) tests/unittests/test_util.py (+3/-3) tests/unittests/test_vmware_config_file.py (+2/-1) tools/make-mime.py (+1/-1) tools/mock-meta.py (+21/-24) tox.ini (+3/-2) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Scott Moser | 2017-12-06 | Approve on 2017-12-08 | |
| Server Team CI bot | continuous-integration | Approve on 2017-12-08 | |
| Joshua Powers (community) | Needs Fixing on 2017-12-06 | ||
|
Review via email:
|
|||
Description of the Change
pylint: Update pylint to 1.7.1, run on tests/ and fix complaints.
- Update tox.ini to invoke pylint v1.7.1.
- Modify .pylintrc generated-members ignore mocked object members (m_.*)
- Replace "dangerous" params defaulting to {}
- Fix up cloud_tests use of platforms
- Cast some instance objects to with dict()
- Handle python2.7 vs 3+ ConfigParser use of readfp (deprecated)
- Update use of assertEqual(
- replace depricated assertRegexp -> assertRegex
- Remove useless test-class calls to super class
- Assign class property accessors a result and use it
- Fix missing class member in CepkoResultTests
- Fix Cheetah test import
| Joshua Powers (powersj) wrote : | # |
Thanks for doing this! Can you add comment to description/commit message about meta-data getting added to the integration tests?
Looks like a few tip-pylint errors, one of which is why I asked about getting rid of tools/hacking.py.
Otherwise I ran a full lxd and nocloud-kvm test run with no failures:
lxd: https:/
nocloud-kvm: https:/
| Ryan Harper (raharper) wrote : | # |
Didn't mean to run on tools for now.
w.r.t the meta-data bits, I'll defer to Scott, he did that first bit.
On Wed, Dec 6, 2017 at 5:15 PM, Joshua Powers <email address hidden>
wrote:
> Review: Needs Fixing
>
> Thanks for doing this! Can you add comment to description/commit message
> about meta-data getting added to the integration tests?
>
> Looks like a few tip-pylint errors, one of which is why I asked about
> getting rid of tools/hacking.py.
>
> Otherwise I ran a full lxd and nocloud-kvm test run with no failures:
> lxd: https:/
> nocloud-kvm: https:/
>
>
> --
> https:/
> cloud-init/
> You are the owner of ~raharper/
>
| Scott Moser (smoser) wrote : | # |
assuming c-i is happy with this, then i am too.
please do mention tools/hacking.py removal in your commit message.
it is obsolete now as we use 'hacking' module in tox.ini for flake8
FAILED: Continuous integration, rev:ca2ce2ecb14
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
FAILED: MAAS Compatability Testing
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:abb799ecc88
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:d265c4416ed
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: MAAS Compatability Testing
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
| Scott Moser (smoser) wrote : | # |
locally i've been through this locally
tox && ./tools/run-centos 6 --rpm --srpm --unittest &&
./tools/
And c-i is just about to agree
https:/
I am making one change though. i'm going to move the '_tricky' bit for assertRaisesRegex back to the bottom of the file. it seems to fit better there with the other bits that are already there. (and i've tested the above).


FAILED: Continuous integration, rev:5335e1632dd abdbad9ffb01172 0929ae4cd8ebe3 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 589/
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 589/rebuild
https:/