Merge lp:~cerberus/nova/api_tests into lp:~hudson-openstack/nova/trunk

Proposed by Matt Dietz
Status: Merged
Approved by: Matt Dietz
Approved revision: 261
Merged at revision: 265
Proposed branch: lp:~cerberus/nova/api_tests
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 236 lines (+184/-8)
6 files modified
nova/tests/api/__init__.py (+6/-8)
nova/tests/api/rackspace/flavors.py (+34/-0)
nova/tests/api/rackspace/images.py (+39/-0)
nova/tests/api/rackspace/servers.py (+58/-0)
nova/tests/api/rackspace/sharedipgroups.py (+40/-0)
nova/tests/api/test_helper.py (+7/-0)
To merge this branch: bzr merge lp:~cerberus/nova/api_tests
Reviewer Review Type Date Requested Status
Michael Gundlach (community) Approve
Review via email: mp+33709@code.launchpad.net

Description of the change

Moved API tests into a sub-folder of the tests/ and added a stubbed-out test declarations to mirror existing API tickets.

Resubmission from earlier because of my improper file move.

To post a comment you must log in.
Revision history for this message
Michael Gundlach (gundlach) wrote :

80: get_backup_schedules should be part of server test (they're accessed through /servers/4/backup_schedules or something).

198: i'm assuming it was intentional that you didn't name this tests/api/rackspace/__init__.py even though it is testing tests/api/rackspace/__init__.py, whereas the other tests/api/* files do match up with their api/* counterparts. if not intentional, rename; otherwise, ignore this comment :)

review: Needs Fixing
Revision history for this message
Michael Gundlach (gundlach) wrote :

oh and in case you haven't done this thru the bzr workflow yet, you'll make your changes, do a bzr commit, and do a bzr push to modify this branch and thus the diff being merged.

to notify us via email that we should look at this again, set that status on the Merge Proposal page from "Needs Review" to "Work in Progress" and then to "Needs Review" again to generate the email. (yeah, I know.)

Revision history for this message
Jay Pipes (jaypipes) wrote :

Actually, you should mark the merge proposal "Work in Progress" when you are, um, working on it. :) Then, set it back to Needs Review when you, um, need a review again ;)

Revision history for this message
Michael Gundlach (gundlach) wrote :

Yeah, if you like doing extra busywork for no reason ;) How often does someone actually need to know if a "Needs Review" branch is actively having work done on it versus "it's in my queue to get reviewed again at some point"? The less process, the better :)

Revision history for this message
Michael Gundlach (gundlach) wrote :

Oh yeaaaah

review: Approve
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :
Download full text (10.6 KiB)

The attempt to merge lp:~cerberus/nova/api_tests into lp:nova failed.Below is the output from the failed tests.

nova.tests.access_unittest
  AccessTestCase
    test_001_allow_all ... [OK]
    test_002_allow_none ... [OK]
    test_003_allow_project_manager ... [OK]
    test_004_allow_sys_and_net ... [OK]
    test_005_allow_sys_no_pm ... [OK]
nova.tests.api_unittest
  ApiEc2TestCase
    test_describe_instances ... [OK]
    test_get_all_key_pairs ... [OK]
nova.tests.auth_unittest
  AuthTestCase
    test_001_can_create_users ... [OK]
    test_002_can_get_user ... [OK]
    test_003_can_retreive_properties ... [OK]
    test_004_signature_is_valid ... [OK]
    test_005_can_get_credentials ... [OK]
    test_006_test_key_storage ... [OK]
    test_007_test_key_generation ... [OK]
    test_008_can_list_key_pairs ... [OK]
    test_009_can_delete_key_pair ... [OK]
    test_010_can_list_users ... [OK]
    test_101_can_add_user_role ... [OK]
    test_199_can_remove_user_role ... [OK]
    test_201_can_create_project ... [OK]
    test_202_user1_is_project_member ... [OK]
    test_203_user2_is_not_project_member ... [OK]
    test_204_user1_is_project_manager ... [OK]
    test_205_user2_is_not_project_manager ... [OK]
    test_206_can_add_user_to_project ... [OK]
    test_207_can_remove_user_from_project ... [OK]
    test_208_can_remove_add_user_with_role ... [OK]
    test_209_can_generate_x509 ... [OK]
    test_210_can_add_project_role ... [OK]
    test_211_can_list_project_roles ... [OK]
    test_212_can_remove_project_role ... [OK]
    test_214_can_retrieve_project_by_user ... [OK]
    test_299_can_delete_project ... [OK]
    test_999_can_delete_users ... [OK]
nova.tests.cloud_unittest
  CloudTestCase
    test_console_output ... [OK]
    test_instance_update_state ... [OK]
    test_run_instances ... ...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'nova/tests/api'
2=== renamed file 'nova/api/test.py' => 'nova/tests/api/__init__.py'
3--- nova/api/test.py 2010-08-18 22:00:20 +0000
4+++ nova/tests/api/__init__.py 2010-09-01 16:42:43 +0000
5@@ -26,7 +26,7 @@
6 import webob.dec
7
8 from nova import api
9-
10+from nova.tests.api.test_helper import *
11
12 class Test(unittest.TestCase):
13
14@@ -52,10 +52,8 @@
15 result = webob.Request.blank('/test/cloud').get_response(api.API())
16 self.assertNotEqual(result.body, "/cloud")
17
18-
19-class APIStub(object):
20- """Class to verify request and mark it was called."""
21-
22- @webob.dec.wsgify
23- def __call__(self, req):
24- return req.path_info
25+ def test_query_api_version(self):
26+ pass
27+
28+if __name__ == '__main__':
29+ unittest.main()
30
31=== added directory 'nova/tests/api/rackspace'
32=== added file 'nova/tests/api/rackspace/__init__.py'
33=== added file 'nova/tests/api/rackspace/flavors.py'
34--- nova/tests/api/rackspace/flavors.py 1970-01-01 00:00:00 +0000
35+++ nova/tests/api/rackspace/flavors.py 2010-09-01 16:42:43 +0000
36@@ -0,0 +1,34 @@
37+# vim: tabstop=4 shiftwidth=4 softtabstop=4
38+
39+# Copyright 2010 OpenStack LLC.
40+# All Rights Reserved.
41+#
42+# Licensed under the Apache License, Version 2.0 (the "License"); you may
43+# not use this file except in compliance with the License. You may obtain
44+# a copy of the License at
45+#
46+# http://www.apache.org/licenses/LICENSE-2.0
47+#
48+# Unless required by applicable law or agreed to in writing, software
49+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
50+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
51+# License for the specific language governing permissions and limitations
52+# under the License.
53+
54+import unittest
55+
56+from nova.api.rackspace import flavors
57+from nova.tests.api.test_helper import *
58+
59+class FlavorsTest(unittest.TestCase):
60+ def setUp(self):
61+ self.stubs = stubout.StubOutForTesting()
62+
63+ def tearDown(self):
64+ self.stubs.UnsetAll()
65+
66+ def test_get_flavor_list(self):
67+ pass
68+
69+ def test_get_flavor_by_id(self):
70+ pass
71
72=== added file 'nova/tests/api/rackspace/images.py'
73--- nova/tests/api/rackspace/images.py 1970-01-01 00:00:00 +0000
74+++ nova/tests/api/rackspace/images.py 2010-09-01 16:42:43 +0000
75@@ -0,0 +1,39 @@
76+# vim: tabstop=4 shiftwidth=4 softtabstop=4
77+
78+# Copyright 2010 OpenStack LLC.
79+# All Rights Reserved.
80+#
81+# Licensed under the Apache License, Version 2.0 (the "License"); you may
82+# not use this file except in compliance with the License. You may obtain
83+# a copy of the License at
84+#
85+# http://www.apache.org/licenses/LICENSE-2.0
86+#
87+# Unless required by applicable law or agreed to in writing, software
88+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
89+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
90+# License for the specific language governing permissions and limitations
91+# under the License.
92+
93+import unittest
94+
95+from nova.api.rackspace import images
96+from nova.tests.api.test_helper import *
97+
98+class ImagesTest(unittest.TestCase):
99+ def setUp(self):
100+ self.stubs = stubout.StubOutForTesting()
101+
102+ def tearDown(self):
103+ self.stubs.UnsetAll()
104+
105+ def test_get_image_list(self):
106+ pass
107+
108+ def test_delete_image(self):
109+ pass
110+
111+ def test_create_image(self):
112+ pass
113+
114+
115
116=== added file 'nova/tests/api/rackspace/servers.py'
117--- nova/tests/api/rackspace/servers.py 1970-01-01 00:00:00 +0000
118+++ nova/tests/api/rackspace/servers.py 2010-09-01 16:42:43 +0000
119@@ -0,0 +1,58 @@
120+# vim: tabstop=4 shiftwidth=4 softtabstop=4
121+
122+# Copyright 2010 OpenStack LLC.
123+# All Rights Reserved.
124+#
125+# Licensed under the Apache License, Version 2.0 (the "License"); you may
126+# not use this file except in compliance with the License. You may obtain
127+# a copy of the License at
128+#
129+# http://www.apache.org/licenses/LICENSE-2.0
130+#
131+# Unless required by applicable law or agreed to in writing, software
132+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
133+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
134+# License for the specific language governing permissions and limitations
135+# under the License.
136+
137+import unittest
138+
139+from nova.api.rackspace import servers
140+from nova.tests.api.test_helper import *
141+
142+class ServersTest(unittest.TestCase):
143+ def setUp(self):
144+ self.stubs = stubout.StubOutForTesting()
145+
146+ def tearDown(self):
147+ self.stubs.UnsetAll()
148+
149+ def test_get_server_list(self):
150+ pass
151+
152+ def test_create_instance(self):
153+ pass
154+
155+ def test_get_server_by_id(self):
156+ pass
157+
158+ def test_get_backup_schedule(self):
159+ pass
160+
161+ def test_get_server_details(self):
162+ pass
163+
164+ def test_get_server_ips(self):
165+ pass
166+
167+ def test_server_reboot(self):
168+ pass
169+
170+ def test_server_rebuild(self):
171+ pass
172+
173+ def test_server_resize(self):
174+ pass
175+
176+ def test_delete_server_instance(self):
177+ pass
178
179=== added file 'nova/tests/api/rackspace/sharedipgroups.py'
180--- nova/tests/api/rackspace/sharedipgroups.py 1970-01-01 00:00:00 +0000
181+++ nova/tests/api/rackspace/sharedipgroups.py 2010-09-01 16:42:43 +0000
182@@ -0,0 +1,40 @@
183+# vim: tabstop=4 shiftwidth=4 softtabstop=4
184+
185+# Copyright 2010 OpenStack LLC.
186+# All Rights Reserved.
187+#
188+# Licensed under the Apache License, Version 2.0 (the "License"); you may
189+# not use this file except in compliance with the License. You may obtain
190+# a copy of the License at
191+#
192+# http://www.apache.org/licenses/LICENSE-2.0
193+#
194+# Unless required by applicable law or agreed to in writing, software
195+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
196+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
197+# License for the specific language governing permissions and limitations
198+# under the License.
199+
200+import unittest
201+
202+from nova.api.rackspace import sharedipgroups
203+from nova.tests.api.test_helper import *
204+
205+class SharedIpGroupsTest(unittest.TestCase):
206+ def setUp(self):
207+ self.stubs = stubout.StubOutForTesting()
208+
209+ def tearDown(self):
210+ self.stubs.UnsetAll()
211+
212+ def test_get_shared_ip_groups(self):
213+ pass
214+
215+ def test_create_shared_ip_group(self):
216+ pass
217+
218+ def test_delete_shared_ip_group(self):
219+ pass
220+
221+
222+
223
224=== added file 'nova/tests/api/test_helper.py'
225--- nova/tests/api/test_helper.py 1970-01-01 00:00:00 +0000
226+++ nova/tests/api/test_helper.py 2010-09-01 16:42:43 +0000
227@@ -0,0 +1,7 @@
228+import webob.dec
229+
230+class APIStub(object):
231+ """Class to verify request and mark it was called."""
232+ @webob.dec.wsgify
233+ def __call__(self, req):
234+ return req.path_info
235
236=== renamed file 'nova/wsgi_test.py' => 'nova/tests/api/wsgi_test.py'