Merge pull request #385 from m-brown/fix_api_test_fragility

fixed API test fragility
This commit is contained in:
Jean-Frédéric 2016-10-06 15:28:47 +01:00 committed by GitHub
commit 16828aed7d
1 changed files with 22 additions and 18 deletions

View File

@ -536,11 +536,15 @@ class TestAPI(LocalTestCase):
'name': u'Service',
'users_to_notify': [],
'alerts_enabled': True,
'status_checks': [5, 6, 7],
'status_checks': [
self.graphite_check.id,
self.jenkins_check.id,
self.http_check.id
],
'alerts': [],
'hackpad_id': None,
'instances': [],
'id': 2,
'id': self.service.id,
'url': u'',
'overall_status': u'PASSING'
},
@ -550,11 +554,11 @@ class TestAPI(LocalTestCase):
'name': u'Hello',
'users_to_notify': [],
'alerts_enabled': True,
'status_checks': [8],
'status_checks': [pingcheck.id],
'alerts': [],
'hackpad_id': None,
'address': u'192.168.0.1',
'id': 2,
'id': self.instance.id,
'overall_status': u'PASSING'
},
],
@ -565,7 +569,7 @@ class TestAPI(LocalTestCase):
'importance': u'ERROR',
'frequency': 5,
'debounce': 0,
'id': 5,
'id': self.graphite_check.id,
'calculated_status': u'passing',
},
{
@ -574,7 +578,7 @@ class TestAPI(LocalTestCase):
'importance': u'ERROR',
'frequency': 5,
'debounce': 0,
'id': 6,
'id': self.jenkins_check.id,
'calculated_status': u'passing',
},
{
@ -583,7 +587,7 @@ class TestAPI(LocalTestCase):
'importance': u'CRITICAL',
'frequency': 5,
'debounce': 0,
'id': 7,
'id': self.http_check.id,
'calculated_status': u'passing',
},
{
@ -592,7 +596,7 @@ class TestAPI(LocalTestCase):
'importance': u'ERROR',
'frequency': 5,
'debounce': 0,
'id': 8,
'id': pingcheck.id,
'calculated_status': u'passing',
},
],
@ -608,7 +612,7 @@ class TestAPI(LocalTestCase):
'value': u'9.0',
'expected_num_hosts': 0,
'allowed_num_failures': 0,
'id': 5,
'id': self.graphite_check.id,
'calculated_status': u'passing',
},
],
@ -626,7 +630,7 @@ class TestAPI(LocalTestCase):
'status_code': u'200',
'timeout': 10,
'verify_ssl_certificate': True,
'id': 7,
'id': self.http_check.id,
'calculated_status': u'passing',
},
],
@ -638,7 +642,7 @@ class TestAPI(LocalTestCase):
'frequency': 5,
'debounce': 0,
'max_queued_build_time': 10,
'id': 6,
'id': self.jenkins_check.id,
'calculated_status': u'passing',
},
],
@ -649,7 +653,7 @@ class TestAPI(LocalTestCase):
'importance': u'ERROR',
'frequency': 5,
'debounce': 0,
'id': 8,
'id': pingcheck.id,
'calculated_status': u'passing',
},
],
@ -664,7 +668,7 @@ class TestAPI(LocalTestCase):
'alerts': [],
'hackpad_id': None,
'instances': [],
'id': 2,
'id': self.service.id,
'url': u'',
'overall_status': u'PASSING',
},
@ -678,7 +682,7 @@ class TestAPI(LocalTestCase):
'alerts': [],
'hackpad_id': None,
'address': u'255.255.255.255',
'id': 2,
'id': self.instance.id,
'overall_status': u'PASSING',
},
],
@ -694,7 +698,7 @@ class TestAPI(LocalTestCase):
'value': u'2',
'expected_num_hosts': 0,
'allowed_num_failures': 0,
'id': 5,
'id': self.graphite_check.id,
'calculated_status': u'passing',
},
],
@ -712,7 +716,7 @@ class TestAPI(LocalTestCase):
'status_code': u'201',
'timeout': 30,
'verify_ssl_certificate': True,
'id': 7,
'id': self.http_check.id,
'calculated_status': u'passing',
},
],
@ -724,7 +728,7 @@ class TestAPI(LocalTestCase):
'frequency': 5,
'debounce': 0,
'max_queued_build_time': 37,
'id': 6,
'id': self.jenkins_check.id,
'calculated_status': u'passing',
},
],
@ -735,7 +739,7 @@ class TestAPI(LocalTestCase):
'importance': u'CRITICAL',
'frequency': 5,
'debounce': 0,
'id': 8,
'id': pingcheck.id,
'calculated_status': u'passing',
},
],