Fixes LP Bug#903977 - Boundary tests for list servers
Adds boundary test for showing a non-existing server
Added test_get_nonexistant_server_details
Change-Id: I6fd4562a3d6c2b602c607bcad215ef58f93932b5
diff --git a/tempest/tests/test_list_servers.py b/tempest/tests/test_list_servers.py
index a39069e..af739df 100644
--- a/tempest/tests/test_list_servers.py
+++ b/tempest/tests/test_list_servers.py
@@ -2,6 +2,7 @@
import nose.plugins.skip
+from nose.plugins.attrib import attr
from tempest import openstack
from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
@@ -127,3 +128,13 @@
self.assertEqual(self.s1_name, server['name'])
self.assertEqual(self.image_ref, server['image']['id'])
self.assertEqual(str(self.flavor_ref), server['flavor']['id'])
+
+ @attr(type='negative')
+ def test_get_nonexistant_server_details(self):
+ """Negative test: GET on non existant server should not succeed"""
+ try:
+ resp, server = self.client.get_server(999)
+ except exceptions.NotFound:
+ pass
+ else:
+ self.fail('GET on non existant server should not succeed')