Skip to content

Expand tests to cover ssh logic #315

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

Merged
merged 4 commits into from
Feb 11, 2025

Conversation

msheiny
Copy link
Contributor

@msheiny msheiny commented Feb 7, 2025

Partial progress towards integration tests : #302

What's Changed

  • Added the fakenos library to spin up an SSH mock IOS device as part of unit-tests. This increases the amount of code with the ultimate goal of preventing regressions and allow further refactoring with more confidence.
  • Added one log line to aid in debugging jinja errors against the job. I'll circle back and add a larger debug issue there cause I burnt a lot of time figuring out the problem.

Remaining work

  • There is currently a bug in the CSV handling that prevents me from also adding a CSV test here. Waiting for Address bug with CSV import on sync job #314 to get merged so that I can circle back and add a relevant test for that as well.
  • There are two issues with fakenos atm:
  1. They aren't publishing the latest code to pypi and the one that is published has its own sets of bugs that i ran into, so i had to install directly from git in the project.toml. I mentioned it to the maintainers in an issue, not sure if they'll address
  2. There is a bug with plugin ecosystem logic that allows you to define custom device responses. I had to patch around it in our tests which is not a great long-term solution. So I want to make a PR for that upstream OR worst case fork that library and install from there.

I'm not sure if it's worth adding documentation updates in this PR to discuss the fakenos library but happy to add those pages if ya'll deem its necessary here.

To Do

  • Explanation of Change(s)
  • Added change log fragment(s) (for more information see the documentation)
  • Attached Screenshots, Payload Example
  • Unit, Integration Tests
  • Documentation Updates (when adding/changing features)
  • Outline Remaining Work, Constraints from Design

@msheiny msheiny force-pushed the msheiny_integ_tests branch 6 times, most recently from e59a204 to 5fb1e84 Compare February 7, 2025 17:34
@msheiny msheiny force-pushed the msheiny_integ_tests branch from 5fb1e84 to c544492 Compare February 10, 2025 05:21
@msheiny msheiny force-pushed the msheiny_integ_tests branch from c544492 to fee6c1f Compare February 10, 2025 05:23
@msheiny msheiny marked this pull request as ready for review February 10, 2025 16:35
@scetron scetron merged commit 97d1d57 into nautobot:develop Feb 11, 2025
14 checks passed
This was referenced Feb 11, 2025
Dav-C pushed a commit that referenced this pull request Mar 28, 2025
* Expand tests to cover ssh logic
---------
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