Skip to content
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

Use pytest for test framework and fix for "show ip ospf neighbor" #40

Merged
merged 1 commit into from
Apr 24, 2019

Conversation

ogenstad
Copy link
Contributor

The current template for Cisco IOS with the reference data doesn't work and the old tests using Ansible doesn't pick this up. I've added done a small change to the template and added a new pair of files for reference and parsed data. These won't be run with the old tests but the py.test one loads all of the files.

I'm not actually sure about the validity of the data in the old reference file with two spaces after / here: FULL/ -. I just left that part as it was. Instead I edited the parsed reference which didn't have the extra space. It could be that the reference data was edited before it was submitted. Let me know if you want me to change the reference data instead.

Ps. As a next step I would vote for removing the Ansible tests as it's easier to see what's going wrong with the new tests, it's possible to test more reference files and they run much quicker.

@ogenstad
Copy link
Contributor Author

I see that the current tests fail because of how it tries to find the data for the test.

What do you say about changing .travis.yml so it uses pytest instead?

@ogenstad ogenstad changed the title Fix for "show ip ospf neighbor" and removal of old tests from tox.ini Use pytest for test framework and fix for "show ip ospf neighbor" Oct 26, 2016
@jmcgill298
Copy link
Contributor

jmcgill298 commented Jan 30, 2019

ogenstad [4:24 PM]
One remaining issue is that the tests now fail due to the fact that the test framework can’t automatically find the tests for vyos. This looks like it’s due to the wildcard at the bottom of the index file for vyatta_vyos. Should that wildcard be there?


mcgoo298 [4:30 PM]
I'm assuming the theory is that there are several vyos implementations that should still apply regardless of the vendor using it. But that is something I should look into.
Thanks for the rebase and updates. I will try to take a look by the weekend.

ogenstad [4:54 PM]
Ok, for now I just added that one and a few others to a list of checks that are ignored. That part is only for a check to validate that test cases exists for all entries in the index file. The actual tests are still run against those. Can try to come up with some other solution to verify that tests exist for things like the vyos one. Can perhaps to a file search if there’s a `*` character in the platform instead of doing an exact match.

@jmcgill298 jmcgill298 changed the base branch from master to tests April 24, 2019 14:49
@jmcgill298 jmcgill298 merged commit 77a40dd into networktocode:tests Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants