-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for documentation #106
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good idea.
The only thing I don't like is having two different set of tests defined in two different locations (one in .travis.yml and one in tox.ini).
I am sure I am going to get confused by that in the future.
What extra value is tox providing here (since we are PY27 only)?
tox.ini
Outdated
deps = | ||
-rrequirements.txt | ||
pytest | ||
ansible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should create a requirements-dev.txt
file and have pytest, ansible, tox in that as well as `-r requirements.txt.
I agree with the comment about duplicate ways to test with tox. Mostly for now that was to give me an easy way to test. The only current value tox brings is that it tests that the package is actually installable and working. But I would say that tox either gets removed later, or the other tests gets moved in there too. |
Yeah, this is cool. We should consolidate tests to use one tool though as kirk suggested |
I removed tox. Was just a bit lazy and installed a new environment instead. The above might need some other tests as there are some parts of the documentation missing in the modules now (such as Please also comment on napalm-automation/napalm#535 :) |
I think I'm happy with this one now. There are other tests which can be added in the future and some extra controls. Once this is merged I can add the git clone script in the NAPALM repo which uses the generated json files from here to build the documentation. |
This is for the 2017 Hackathon napalm-automation/hackathon-2017#10 This commit validates that each Ansible module has a DOCUMENTATION and an EXAMPLES variable. It also asserts that those variables are properly formatted YAML strings.
Content for the RETURN variable will be added later.
Ok, so now this passes the test. I was only looking at the red paint which should actually be there but missed the:
Not sure that one always makes sense. Anyway, feel free to review. :) |
awesome work! |
This is for the 2017 Hackathon
napalm-automation/hackathon-2017#10
This commit validates that each Ansible module has a DOCUMENTATION
and an EXAMPLES variable. It also asserts that those variables are
properly formatted YAML strings.