summaryrefslogtreecommitdiff
path: root/trove/tests/api
diff options
context:
space:
mode:
authorAndrey Shestakov <ashestakov@mirantis.com>2013-12-26 17:02:24 +0200
committerAndrey Shestakov <ashestakov@mirantis.com>2014-01-21 21:50:04 +0200
commit2296bdfceaf53b654102cb7bd66146276c871a61 (patch)
tree650f77dec47cb7cce472a54cbfc2282910eb94ce /trove/tests/api
parent68a5481911e4a310609fa8b7fe99987e61de5e9c (diff)
downloadtrove-2296bdfceaf53b654102cb7bd66146276c871a61.tar.gz
Datastores improvements
List of improvements: - added default_version field in datastore show output - admin can list deactivated versions too - admin can see extanded info about datastore version (image_id, packages) - add possibility to retrive version by uuid (without specified datastore) Implements: blueprint datastore-type-version-followon Change-Id: I9b0c3547fb6a881a01db9e6e3d8d72077bc5ee29
Diffstat (limited to 'trove/tests/api')
-rw-r--r--trove/tests/api/datastores.py18
-rw-r--r--trove/tests/api/instances_resize.py2
-rw-r--r--trove/tests/api/mgmt/instances_actions.py2
3 files changed, 12 insertions, 10 deletions
diff --git a/trove/tests/api/datastores.py b/trove/tests/api/datastores.py
index 5442f7cd..efcfe479 100644
--- a/trove/tests/api/datastores.py
+++ b/trove/tests/api/datastores.py
@@ -86,18 +86,20 @@ class Datastores(object):
with TypeCheck('DatastoreVersion', version) as check:
check.has_field("id", basestring)
check.has_field("name", basestring)
+ check.has_field("datastore", basestring)
check.has_field("links", list)
assert_equal(version.name, test_config.dbaas_datastore_version)
@test
- def test_datastore_version_datastore_not_found(self):
- try:
- assert_raises(exceptions.NotFound,
- self.rd_client.datastore_versions.get,
- NAME, NAME)
- except exceptions.BadRequest as e:
- assert_equal(e.message,
- "Datastore '%s' cannot be found." % NAME)
+ def test_datastore_version_get_by_uuid_attrs(self):
+ version = self.rd_client.datastore_versions.get_by_uuid(
+ test_config.dbaas_datastore_version_id)
+ with TypeCheck('DatastoreVersion', version) as check:
+ check.has_field("id", basestring)
+ check.has_field("name", basestring)
+ check.has_field("datastore", basestring)
+ check.has_field("links", list)
+ assert_equal(version.name, test_config.dbaas_datastore_version)
@test
def test_datastore_version_not_found(self):
diff --git a/trove/tests/api/instances_resize.py b/trove/tests/api/instances_resize.py
index fdea966a..94c6fa47 100644
--- a/trove/tests/api/instances_resize.py
+++ b/trove/tests/api/instances_resize.py
@@ -52,7 +52,7 @@ class ResizeTestBase(TestCase):
flavor_id=OLD_FLAVOR_ID,
tenant_id=999,
volume_size=None,
- datastore_version_id=test_config.dbaas_datastore_version,
+ datastore_version_id=test_config.dbaas_datastore_version_id,
task_status=InstanceTasks.RESIZING)
self.server = self.mock.CreateMock(Server)
self.instance = models.BuiltInstanceTasks(context,
diff --git a/trove/tests/api/mgmt/instances_actions.py b/trove/tests/api/mgmt/instances_actions.py
index 4f6fcbf2..3ef933ca 100644
--- a/trove/tests/api/mgmt/instances_actions.py
+++ b/trove/tests/api/mgmt/instances_actions.py
@@ -52,7 +52,7 @@ class MgmtInstanceBase(object):
self.db_info = DBInstance.create(
name="instance",
flavor_id=1,
- datastore_version_id=test_config.dbaas_datastore_version,
+ datastore_version_id=test_config.dbaas_datastore_version_id,
tenant_id=self.tenant_id,
volume_size=None,
task_status=InstanceTasks.NONE)