diff options
Diffstat (limited to 'tests/python_coverage_ip_utils.py')
-rw-r--r-- | tests/python_coverage_ip_utils.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/python_coverage_ip_utils.py b/tests/python_coverage_ip_utils.py new file mode 100644 index 00000000..35280c18 --- /dev/null +++ b/tests/python_coverage_ip_utils.py @@ -0,0 +1,25 @@ +import sys +from apex import ip_utils + +iface = ip_utils.get_interface(sys.argv[1]) + +erroring_tests = ( + "ip_utils.get_interface('')", + "ip_utils.get_interface('lo', address_family=0)", + "ip_utils.get_interface('lo', address_family=6)", + "ip_utils.get_interface('lo')", + "ip_utils.get_ip_range()", + "ip_utils.get_ip_range(interface=iface)") + +for t in erroring_tests: + try: + eval(t) + except: + pass + +ip_utils.find_gateway(interface=iface) +ip_utils.get_ip(1, cidr="10.10.10.0/24") +ip_utils.get_ip(1, interface=iface) +ip_utils.get_ip_range(interface=iface, start_offset=1, end_offset=20) +ip_utils.get_ip_range(interface=iface, start_offset=1, count=10) +ip_utils.get_ip_range(interface=iface, end_offset=20, count=10) |