ansible / galaxy

Legacy Galaxy still available as read-only on https://old-galaxy.ansible.com - looking for the new galaxy -> https://github.com/ansible/galaxy_ng
Apache License 2.0
854 stars 328 forks source link

Documentation should state what tests are run #2182

Open kbreit opened 4 years ago

kbreit commented 4 years ago

Feature Request

I am importing modules via collections and the linting is giving me errors. However, ansible-test sanity is not showing these errors and I cannot find what command to run to discover these errors before I upload. Galaxy should offer some documentation to show what tests are run so I can reproduce the errors locally.

samccann commented 4 years ago

@kbreit - can you elaborate on the steps you were taking? We chatted a bit in the Ansible Documentation WG meeting today (https://github.com/ansible/community/issues/389#issuecomment-566582126) but need some more detail on whether this is something just a developer would need, or something a collection user would also need etc.

kbreit commented 4 years ago

@samccann In reverse, this is something a developer would need and not likely a user. I've been running sanity tests using ansible-test sanity --docker default --python 3.7 and it will provide suggestions. However, even when I've fixed all the suggestions/errors, I will receive other problems within Ansible Galaxy when I upload the collection. For example, I don't believe these show up in the ansible-test results.

flake8 Warnings: 
plugins/modules/meraki_intrusion_prevention.py:186:1: F401 'os' imported but unused 
plugins/modules/meraki_intrusion_prevention.py:187:1: F401 'ansible.module_utils.basic.env_fallback' imported but unused 
plugins/modules/meraki_intrusion_prevention.py:188:1: F401 'ansible.module_utils.urls.fetch_url' imported but unused 
plugins/modules/meraki_intrusion_prevention.py:189:1: F401 'ansible.module_utils._text.to_native' imported but unused