Comment 4 for bug 1072841

Revision history for this message
David Kranz (david-kranz) wrote :

I just tried this with the current devstack and it worked. But if the intended behavior is to accept anything and return an empty list then perhaps this case should just be removed.

diff --git a/tempest/tests/compute/servers/test_list_servers_negative.py b/tempest/tests/compute/servers/test_list_servers_
index 1be7480..340b28c 100644
--- a/tempest/tests/compute/servers/test_list_servers_negative.py
+++ b/tempest/tests/compute/servers/test_list_servers_negative.py
@@ -142,8 +142,9 @@ class ListServersNegativeTest(BaseComputeTest):

     def test_list_servers_pass_numeric_status(self):
         """Return an error when a numeric value for status is specified"""
- self.assertRaises(exceptions.BadRequest, self.client.list_servers,
- {'status': 1})
+ resp, body = self.client.list_servers({'status': 1})
+ self.assertEqual('200', resp['status'])
+ self.assertEqual(0, len(body['servers']))

     def test_list_servers_by_limits(self):
         """List servers by specifying limits"""