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

Create test module for network endpoints #7

Open
tonybaloney opened this issue Apr 15, 2017 · 2 comments
Open

Create test module for network endpoints #7

tonybaloney opened this issue Apr 15, 2017 · 2 comments

Comments

@tonybaloney
Copy link

Having access to an actual network endpoint is challenging for (repeatable) integration and unit tests.

We need a NAPALM implementation that just provides static data

@ppalasti
Copy link

We can make it with physical or virtual devices.
I think, it is easier with virtual devices (ex.: GNS3, some IOU or real device images and Virtualbox).

What do you think?

@mirceaulinic
Copy link

@tonybaloney thanks a lot again for taking this initiative.

Having tests is definitely something we need.
There are a couple of challenges:

  • we cannot test proxy modules yet, but @cro is actively working on this under WIP: Proxy auto test, feedback appreciated saltstack/salt#39575. Additionally you could comment under Ideas for further proxymodule testing saltstack/salt#39605 if you see any good solution.
  • for the execution module, although on longer term we should have, I think we can leave aside testing most of the functions - for example bgp.neighbors, net.interfaces and many others simply forward the output from napalm; and their structure is already tested under each driver. But there are others such as net.load_config or net.load_template which have much more complex logic that has to be tested.

With these said, I would propose the following order:

  1. tests for some exec module functions that do more than simply forwarding the output
  2. tests for states
  3. later: tests for proxies (when available)
  4. tests for all possible functions

Does this make sense?
Thanks,
-Mircea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants