summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2011-12-08 11:14:39 -0800
committerVishvananda Ishaya <vishvananda@gmail.com>2011-12-08 11:19:47 -0800
commitd06da5d652ececcefcd0ff1c1dd3fe4cb0cf712b (patch)
tree1c4aa5b74836a9168bb611613e53d84398165f26
parent5a84fd66db675d6ce99254f7c242d02a059a9024 (diff)
downloadnova-d06da5d652ececcefcd0ff1c1dd3fe4cb0cf712b.tar.gz
nova-d06da5d652ececcefcd0ff1c1dd3fe4cb0cf712b.tar.xz
nova-d06da5d652ececcefcd0ff1c1dd3fe4cb0cf712b.zip
Relax dependency on boto 1.9b and nova-adminclient
* change boto=1.9b to boto * fix the tests * remove nova-adminclient dependency * remove the useless smoketests for nova-adminclient Change-Id: Ie191453941e64774496a912cb64d1417f3f1bea3
-rw-r--r--nova/tests/test_api.py2
-rw-r--r--smoketests/test_admin.py91
-rw-r--r--tools/pip-requires3
3 files changed, 3 insertions, 93 deletions
diff --git a/nova/tests/test_api.py b/nova/tests/test_api.py
index 2d3d4b604..cb33df2bb 100644
--- a/nova/tests/test_api.py
+++ b/nova/tests/test_api.py
@@ -75,6 +75,8 @@ class FakeHttplibConnection(object):
resp = "HTTP/1.0 %s" % resp
self.sock = FakeHttplibSocket(resp)
self.http_response = httplib.HTTPResponse(self.sock)
+ # NOTE(vish): boto is accessing private variables for some reason
+ self._HTTPConnection__response = self.http_response
self.http_response.begin()
def getresponse(self):
diff --git a/smoketests/test_admin.py b/smoketests/test_admin.py
deleted file mode 100644
index 1b7a8d673..000000000
--- a/smoketests/test_admin.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2010 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-import os
-import random
-import sys
-import unittest
-import zipfile
-
-# If ../nova/__init__.py exists, add ../ to Python search path, so that
-# it will override what happens to be installed in /usr/(local/)lib/python...
-possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
- os.pardir,
- os.pardir))
-if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
- sys.path.insert(0, possible_topdir)
-
-from smoketests import flags
-from smoketests import base
-
-
-FLAGS = flags.FLAGS
-
-# TODO(devamcar): Use random tempfile
-ZIP_FILENAME = '/tmp/nova-me-x509.zip'
-
-TEST_PREFIX = 'test%s' % int(random.random() * 1000000)
-TEST_USERNAME = '%suser' % TEST_PREFIX
-TEST_PROJECTNAME = '%sproject' % TEST_PREFIX
-
-
-class AdminSmokeTestCase(base.SmokeTestCase):
- def setUp(self):
- import nova_adminclient as adminclient
- self.admin = adminclient.NovaAdminClient(
- access_key=os.getenv('EC2_ACCESS_KEY'),
- secret_key=os.getenv('EC2_SECRET_KEY'),
- clc_url=os.getenv('EC2_URL'),
- region=FLAGS.region)
-
-
-class UserTests(AdminSmokeTestCase):
- """ Test admin credentials and user creation. """
-
- def test_001_admin_can_connect(self):
- conn = self.admin.connection_for('admin', 'admin')
- self.assert_(conn)
-
- def test_002_admin_can_create_user(self):
- user = self.admin.create_user(TEST_USERNAME)
- self.assertEqual(user.username, TEST_USERNAME)
-
- def test_003_admin_can_create_project(self):
- project = self.admin.create_project(TEST_PROJECTNAME,
- TEST_USERNAME)
- self.assertEqual(project.projectname, TEST_PROJECTNAME)
-
- def test_004_user_can_download_credentials(self):
- buf = self.admin.get_zip(TEST_USERNAME, TEST_PROJECTNAME)
- output = open(ZIP_FILENAME, 'w')
- output.write(buf)
- output.close()
-
- zip = zipfile.ZipFile(ZIP_FILENAME, 'a', zipfile.ZIP_DEFLATED)
- bad = zip.testzip()
- zip.close()
-
- self.failIf(bad)
-
- def test_999_tearDown(self):
- self.admin.delete_project(TEST_PROJECTNAME)
- self.admin.delete_user(TEST_USERNAME)
- try:
- os.remove(ZIP_FILENAME)
- except:
- pass
diff --git a/tools/pip-requires b/tools/pip-requires
index f9b63b917..c494affde 100644
--- a/tools/pip-requires
+++ b/tools/pip-requires
@@ -4,7 +4,7 @@ pylint==0.19
Cheetah==2.4.4
amqplib==0.6.1
anyjson==0.2.4
-boto==1.9b
+boto
carrot==0.10.5
eventlet
kombu==1.0.4
@@ -27,7 +27,6 @@ netaddr
sphinx
glance
xattr>=0.6.0
-nova-adminclient
suds==0.4
coverage
nosexcover