def test_create_w_config(https_config): monitor = target.HTTPSMonitor(**https_config) assert monitor assert monitor.name == "test_monitor" assert monitor.partition == "Test" data = monitor.data assert data.get('interval') == 1 assert data.get('timeout') == 10 assert data.get('send') == "GET /\r\n" assert data.get('recv') == "SERVER"
def test_crud_https_monitor(self): """Tests the https monitor arch-type""" assert getattr(self, 'bigip', None), \ 'We should always have a bigip at this point...' partition = "Common" name = "test_https" schema = https.HTTPSMonitor.properties schema['partition'] = partition schema['name'] = name monitor = https.HTTPSMonitor(**schema) self.crud_test(monitor)
def test_create_w_defaults(https_config): monitor = target.HTTPSMonitor(name=https_config['name'], partition=https_config['partition']) assert monitor assert monitor.name == "test_monitor" assert monitor.partition == "Test" data = monitor.data assert data.get('interval') == 5 assert data.get('timeout') == 16 assert data.get('send') == "GET /\\r\\n" assert data.get('recv') == ""
def test_get_uri_path(bigip, https_config): monitor = target.HTTPSMonitor(**https_config) assert (monitor._uri_path(bigip) == bigip.tm.ltm.monitor.https_s.https)