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

Remove the external ping test #293

Merged

Conversation

optiz0r
Copy link
Contributor

@optiz0r optiz0r commented Dec 27, 2018

By having a test for external connectivity which isn't stubbed,
what's actually being tested is the network environment of the development
machine, and not the nornir code. There are several examples where
this test would legitimately fail:

  • Offline laptop
  • Corporate environment with restrictive firewall policies.

As such, a failing test does not necessarily indicate an issue with the
code. A failed test will cause downstream tools that depend on passing
tests to fail, or leave developers wasting time looking for non-existent
faults.

@coveralls
Copy link

coveralls commented Dec 27, 2018

Pull Request Test Coverage Report for Build 1099

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.1%) to 92.086%

Files with Coverage Reduction New Missed Lines %
nornir/plugins/inventory/simple.py 2 91.67%
Totals Coverage Status
Change from base Build 1097: -0.1%
Covered Lines: 1408
Relevant Lines: 1529

💛 - Coveralls

By having a test for external connectivity which isn't stubbed,
what's actually being tested is the network environment of the development
machine, and not the nornir code. There are several examples where
this test would legitimately fail:
- Offline laptop
- Corporate environment with restrictive firewall policies.

As such, a failing test does not necessarily indicate an issue with the
code. A failed test will cause downstream tools that depend on passing
tests to fail, or leave developers wasting time looking for non-existent
faults.
@dbarrosop
Copy link
Contributor

I agree, might be nice to mock though. I am going to merge it to avoid unblocking this issue but I think we should basically create a docker-compose file to orchestrate a few containers. I will create an issue for that.


def test_tcp_ping_external_hosts(self):
external = InitNornir(
inventory={"options": {"host_file": ext_inv_file}}, dry_run=True
Copy link
Contributor

@dbarrosop dbarrosop Dec 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the file needed at all? We can probably remove the resources that were used by this test.

@dbarrosop dbarrosop merged commit 94a6a70 into nornir-automation:develop Dec 28, 2018
@optiz0r optiz0r deleted the remove_external_ping_test branch February 17, 2019 16:02
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.

None yet

3 participants