def test_unknown_module_lb_method(self): args = dict( lb_method='obscure_hyphenated_fake_method', ) with pytest.raises(F5ModuleError): p = ModuleParameters(params=args) assert p.lb_method == 'foo'
def test_module_parameters(self): args = dict(monitor_type='m_of_n', monitors=['/Common/Fake', '/Common/Fake2'], quorum=1, slow_ramp_time=200, reselect_tries=5, service_down_action='drop') p = ModuleParameters(params=args) assert p.monitor_type == 'm_of_n' assert p.quorum == 1 assert p.monitors == 'min 1 of { /Common/Fake /Common/Fake2 }' assert p.slow_ramp_time == 200 assert p.reselect_tries == 5 assert p.service_down_action == 'drop'