sshuttle/tests/client
Scott Kuhl 68c9c9bbcd Improve consistency of PATH, environments, and which()
This patch attempts to fix (or aid in debugging) issue #350.

sshuttle didn't explicitly search /sbin and /usr/sbin and they may be
missing in the user's PATH. If PATH is missing, these folders wouldn't
be searched either. There was also a program_exists function which is
redundant to which(). This consolidates everything into the helpers.py
file.

This patch introduces get_path() to return PATH + some extra hardcoded
paths. A new get_env() function can be called to create a consistent
environment when calling external programs. The new which() wrapper
function also ensures we use the same set of paths.

If -vv is supplied, messages clearly indicate the programs we are
looking for, if they are found, and where we looked if we failed to
find them.

I haven't tested the changes to ipfw or pf.
2020-10-23 20:33:20 -04:00
..
test_firewall.py Only write /etc/hosts when necessary. 2020-10-19 00:17:37 -04:00
test_helpers.py remove version_info based branching 2020-06-03 14:30:37 +10:00
test_methods_nat.py Make nat and nft rules consistent; improve rule ordering. 2020-10-21 11:51:39 -04:00
test_methods_pf.py Improve consistency of PATH, environments, and which() 2020-10-23 20:33:20 -04:00
test_methods_tproxy.py Add tproxy udp port mark filter that was missed in #144, fixes #367. 2019-10-13 11:45:04 +11:00
test_options.py Remove localhost test since it can resolve to either IPv4, IPv6, or both in any particular order 2020-10-17 15:56:23 -04:00
test_sdnotify.py Fix/pep8 (#277) 2019-02-11 09:59:13 +11:00