They assume they are running on linux. We should either skip these tests on MacOS or do some better mocking.
test_check_psutil (test_network.TestCheckNetwork) ... ok
test_cx_counters_psutil (test_network.TestCheckNetwork) ... ok
test_cx_state_linux_netstat (test_network.TestCheckNetwork) ... ERROR
test_cx_state_linux_ss (test_network.TestCheckNetwork) ... ERROR
test_cx_state_psutil (test_network.TestCheckNetwork) ... ok
test_parse_protocol_psutil (test_network.TestCheckNetwork) ... ok
test_win_uses_psutil (test_network.TestCheckNetwork) ... ok
======================================================================
ERROR: test_cx_state_linux_netstat (test_network.TestCheckNetwork)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/GregoryMeyer/dd-workspace/integrations-core/venv/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
return func(*args, **keywargs)
File "/Users/GregoryMeyer/dd-workspace/integrations-core/network/test_network.py", line 75, in test_cx_state_linux_netstat
self.run_check({})
File "/Users/GregoryMeyer/dd-workspace/integrations-core/embedded/dd-agent/tests/checks/common.py", line 270, in run_check
raise error # pylint: disable=E0702
IOError: [Errno 2] No such file or directory: '/proc/net/dev'
-------------------- >> begin captured logging << --------------------
utils.subprocess_output: DEBUG: Popen(['/bin/hostname', '-f'], stderr = <tempfile.SpooledTemporaryFile instance at 0x10f601368>, stdout = <tempfile.SpooledTemporaryFile instance at 0x10f6013b0>) called
checks.network: DEBUG: Using `ss` to collect connection state
checks.network: INFO: `ss` not found: using `netstat` as a fallback
aggregator: DEBUG: received 0 payloads since last flush
--------------------- >> end captured logging << ---------------------
======================================================================
ERROR: test_cx_state_linux_ss (test_network.TestCheckNetwork)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/GregoryMeyer/dd-workspace/integrations-core/venv/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
return func(*args, **keywargs)
File "/Users/GregoryMeyer/dd-workspace/integrations-core/network/test_network.py", line 65, in test_cx_state_linux_ss
self.run_check({})
File "/Users/GregoryMeyer/dd-workspace/integrations-core/embedded/dd-agent/tests/checks/common.py", line 270, in run_check
raise error # pylint: disable=E0702
IOError: [Errno 2] No such file or directory: '/proc/net/dev'
-------------------- >> begin captured logging << --------------------
utils.subprocess_output: DEBUG: Popen(['/bin/hostname', '-f'], stderr = <tempfile.SpooledTemporaryFile instance at 0x10f66c440>, stdout = <tempfile.SpooledTemporaryFile instance at 0x10f601488>) called
checks.network: DEBUG: Using `ss` to collect connection state
aggregator: DEBUG: received 0 payloads since last flush
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
Ran 7 tests in 0.140s
FAILED (errors=2)
Exception [Errno 2] No such file or directory: '/proc/net/dev' during check
Traceback (most recent call last):
File "/Users/GregoryMeyer/dd-workspace/integrations-core/embedded/dd-agent/tests/checks/common.py", line 250, in run_check
self.check.check(copy.deepcopy(instance))
File "/Users/GregoryMeyer/dd-workspace/integrations-core/embedded/../network/check.py", line 71, in check
self._check_linux(instance)
File "/Users/GregoryMeyer/dd-workspace/integrations-core/embedded/../network/check.py", line 302, in _check_linux
proc = open(proc_dev_path, 'r')
IOError: [Errno 2] No such file or directory: '/proc/net/dev'
Exception [Errno 2] No such file or directory: '/proc/net/dev' during check
Traceback (most recent call last):
File "/Users/GregoryMeyer/dd-workspace/integrations-core/embedded/dd-agent/tests/checks/common.py", line 250, in run_check
self.check.check(copy.deepcopy(instance))
File "/Users/GregoryMeyer/dd-workspace/integrations-core/embedded/../network/check.py", line 71, in check
self._check_linux(instance)
File "/Users/GregoryMeyer/dd-workspace/integrations-core/embedded/../network/check.py", line 302, in _check_linux
proc = open(proc_dev_path, 'r')
IOError: [Errno 2] No such file or directory: '/proc/net/dev'