CiscoDevNet / ansible-nso

GNU General Public License v3.0
9 stars 9 forks source link

WIP ansible-test sanity & unit #5

Closed gundalow closed 3 years ago

gundalow commented 3 years ago

Run Sanity and unit tests (via ansible-test) This is a requirement before this collection can be included in ansible==2.10

See https://github.com/ansible-collections/overview/issues/128#issuecomment-730620776

gundalow commented 3 years ago

Can you please enable GItHub Actions for this repo https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository

gundalow commented 3 years ago

Failing with

ERROR: Found 3 validate-modules issue(s) which need to be resolved:
ERROR: plugins/modules/nso_config.py:0:0: return-syntax-error: RETURN.changes.contains.to.type: required key not provided @ data['changes']['contains']['to']['type']. Got None
ERROR: plugins/modules/nso_config.py:0:0: return-syntax-error: RETURN.changes.contains.type.type: required key not provided @ data['changes']['contains']['type']['type']. Got None
ERROR: plugins/modules/nso_query.py:0:0: parameter-list-no-elements: Argument 'fields' in argument_spec defines type as list but elements

Full log see https://github.com/gundalow/ansible-nso/actions/runs/391348067

mamullen13316 commented 3 years ago

@gundalow sanity tests for 2.10 should now be passing with the latest commit.

@jabelk @qsnyder could you please enable GitHub Actions for this repo?

qsnyder commented 3 years ago

@mamullen13316 -- just looked in the Repo Settings -- and actions seem to be enabled.

mamullen13316 commented 3 years ago

Thanks for checking @qsnyder. @gundalow please let us know if you are still blocked by Github Actions.

mamullen13316 commented 3 years ago

hi @gundalow, apologies if you were still working on that PR before I merged it. The unit tests were failing on installing of the ansible.utils dependency which I think these modules are not using so I commented out that task. I also added the Python version 3.8 to the unit test command, as it was failing on the default 2.X version in the container. Please let me know if any issues. I wasn't sure if we need to sort out the unit tests failing on 2.X?

felixfontein commented 3 years ago

Right now unit tests seem to run fine for all Python versions (2.6 to 3.9).

The ansible.utils and ansible.netcommon dependencies are not needed, commenting that out is fine.