summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorDevin Carlen <devin.carlen@gmail.com>2010-09-10 15:26:13 -0700
committerDevin Carlen <devin.carlen@gmail.com>2010-09-10 15:26:13 -0700
commite53676bb32b70ff01ca27c310e558b651590be3d (patch)
tree713fe4aeebfee0ded8376996eca46b47ec71433b /nova/tests
parentfffa02ac32055650b2bfffff090ec7d52c86291a (diff)
Refactored to security group api to support projects
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api_unittest.py1
-rw-r--r--nova/tests/virt_unittest.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/nova/tests/api_unittest.py b/nova/tests/api_unittest.py
index 7e914e6f5..55b7cb4d8 100644
--- a/nova/tests/api_unittest.py
+++ b/nova/tests/api_unittest.py
@@ -304,6 +304,7 @@ class ApiEc2TestCase(test.BaseTestCase):
# be good enough for that.
for group in rv:
if group.name == security_group_name:
+ import pdb; pdb.set_trace()
self.assertEquals(len(group.rules), 1)
self.assertEquals(int(group.rules[0].from_port), 80)
self.assertEquals(int(group.rules[0].to_port), 81)
diff --git a/nova/tests/virt_unittest.py b/nova/tests/virt_unittest.py
index 1f573c463..dceced3a9 100644
--- a/nova/tests/virt_unittest.py
+++ b/nova/tests/virt_unittest.py
@@ -86,6 +86,8 @@ class NWFilterTestCase(test.TrialTestCase):
context.user = FakeContext()
context.user.id = 'fake'
context.user.is_superuser = lambda:True
+ context.project = FakeContext()
+ context.project.id = 'fake'
cloud_controller.create_security_group(context, 'testgroup', 'test group description')
cloud_controller.authorize_security_group_ingress(context, 'testgroup', from_port='80',
to_port='81', ip_protocol='tcp',
@@ -93,7 +95,7 @@ class NWFilterTestCase(test.TrialTestCase):
fw = libvirt_conn.NWFilterFirewall()
- security_group = db.security_group_get_by_user_and_name({}, 'fake', 'testgroup')
+ security_group = db.security_group_get_by_name({}, 'fake', 'testgroup')
xml = fw.security_group_to_nwfilter_xml(security_group.id)