コード例 #1
0
def test_create_w_config(http_config):
    monitor = target.HTTPMonitor(**http_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"
コード例 #2
0
 def test_crud_http_monitor(self):
     """Tests the http monitor arch-type"""
     assert getattr(self, 'bigip', None), \
         'We should always have a bigip at this point...'
     partition = 'Common'
     name = 'test_http'
     schema = http.HTTPMonitor.properties
     schema['partition'] = partition
     schema['name'] = name
     monitor = http.HTTPMonitor(**schema)
     self.crud_test(monitor)
コード例 #3
0
def test_create_w_defaults(http_config):
    monitor = target.HTTPMonitor(name=http_config['name'],
                                 partition=http_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') == ""
コード例 #4
0
def test_get_uri_path(bigip, http_config):
    monitor = target.HTTPMonitor(**http_config)

    assert (monitor._uri_path(bigip) == bigip.tm.ltm.monitor.https.http)