From 65d093d9a71884e39a743328f902a7a77297f9f6 Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Wed, 19 Jul 2017 18:09:25 +0200 Subject: [PATCH] Skip f5 tests if f5-sdk is not installed (#27035) Fixes: bug #27034 Introduced by https://github.com/ansible/ansible/commit/278fa552f80f8252a59ff52139d25b4cf088ec18 --- lib/ansible/modules/network/f5/bigip_monitor_tcp_half_open.py | 0 test/units/modules/network/f5/test_bigip_monitor_tcp_echo.py | 1 + .../units/modules/network/f5/test_bigip_monitor_tcp_half_open.py | 1 + 3 files changed, 2 insertions(+) mode change 100644 => 100755 lib/ansible/modules/network/f5/bigip_monitor_tcp_half_open.py diff --git a/lib/ansible/modules/network/f5/bigip_monitor_tcp_half_open.py b/lib/ansible/modules/network/f5/bigip_monitor_tcp_half_open.py old mode 100644 new mode 100755 diff --git a/test/units/modules/network/f5/test_bigip_monitor_tcp_echo.py b/test/units/modules/network/f5/test_bigip_monitor_tcp_echo.py index b50b94567e552f..36baab4066ed01 100644 --- a/test/units/modules/network/f5/test_bigip_monitor_tcp_echo.py +++ b/test/units/modules/network/f5/test_bigip_monitor_tcp_echo.py @@ -45,6 +45,7 @@ from ansible.modules.network.f5.bigip_monitor_tcp_echo import Parameters from ansible.modules.network.f5.bigip_monitor_tcp_echo import ModuleManager from ansible.modules.network.f5.bigip_monitor_tcp_echo import ArgumentSpec + from ansible.module_utils.f5_utils import iControlUnexpectedHTTPError except ImportError: raise SkipTest("F5 Ansible modules require the f5-sdk Python library") diff --git a/test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py b/test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py index ea3038e48316e2..f2a4a228ac771b 100644 --- a/test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py +++ b/test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py @@ -45,6 +45,7 @@ from ansible.modules.network.f5.bigip_monitor_tcp_half_open import Parameters from ansible.modules.network.f5.bigip_monitor_tcp_half_open import ModuleManager from ansible.modules.network.f5.bigip_monitor_tcp_half_open import ArgumentSpec + from ansible.module_utils.f5_utils import iControlUnexpectedHTTPError except ImportError: raise SkipTest("F5 Ansible modules require the f5-sdk Python library")