Increasing event stats max range

This commit is contained in:
Andrew Melton 2014-03-03 15:37:34 -05:00
parent 913310e4f5
commit 93d13262db
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ from stacktach import utils
DEFAULT_LIMIT = 50
HARD_LIMIT = 1000
HARD_WHEN_RANGE_LIMIT = 5 * 24 * 60 * 60 # 5 Days
HARD_WHEN_RANGE_LIMIT = 7 * 24 * 60 * 60 # 5 Days
class APIException(Exception):

View File

@ -1144,7 +1144,7 @@ class DBAPITestCase(StacktachBaseTestCase):
fake_request = self.mox.CreateMockAnything()
fake_request.method = 'GET'
fake_request.GET = {'when_min': "2014-2-26 00:00:00",
'when_max': "2014-3-3 00:00:01", # > 5 days later
'when_max': "2014-3-5 00:00:01", # > 7 days later
'service': "nova"}
self.mox.ReplayAll()
@ -1152,7 +1152,7 @@ class DBAPITestCase(StacktachBaseTestCase):
response = dbapi.get_event_stats(fake_request)
self.assertEqual(response.status_code, 400)
self.assertEqual(json.loads(response.content)['message'],
"Date ranges may be no larger than 432000 seconds")
"Date ranges may be no larger than 604800 seconds")
self.mox.VerifyAll()
def test_get_verified_count_wrong_date_format_returns_400(self):