From 486dfe3bfc6e8765bbf84f3c6267e613a3d0f275 Mon Sep 17 00:00:00 2001 From: Gorka Eguileor Date: Wed, 24 Aug 2016 17:13:51 +0200 Subject: [PATCH] Remove host assignment in Snapshot OVO Our Snapshot OVO doesn't have a host field so we shouldn't give it a value in our tests. This patch removes host assignment to Snapshot OVO instances from our tests. Change-Id: I7636a513ea19bbc8d51c293a2b551f3b31668d54 --- cinder/tests/unit/backup/test_backup.py | 1 - cinder/tests/unit/test_quota.py | 1 - cinder/tests/unit/test_volume.py | 5 ----- 3 files changed, 7 deletions(-) diff --git a/cinder/tests/unit/backup/test_backup.py b/cinder/tests/unit/backup/test_backup.py index 61ac64dc9..3b0396513 100644 --- a/cinder/tests/unit/backup/test_backup.py +++ b/cinder/tests/unit/backup/test_backup.py @@ -146,7 +146,6 @@ class BaseBackupTest(test.TestCase): """ kwargs = {} kwargs['size'] = size - kwargs['host'] = 'testhost' kwargs['user_id'] = str(uuid.uuid4()) kwargs['project_id'] = str(uuid.uuid4()) kwargs['status'] = status diff --git a/cinder/tests/unit/test_quota.py b/cinder/tests/unit/test_quota.py index 117d1f87f..016a597d8 100644 --- a/cinder/tests/unit/test_quota.py +++ b/cinder/tests/unit/test_quota.py @@ -93,7 +93,6 @@ class QuotaIntegrationTestCase(test.TestCase): snapshot.project_id = self.project_id or fake.PROJECT_ID snapshot.volume_id = volume['id'] snapshot.volume_size = volume['size'] - snapshot.host = volume['host'] snapshot.status = fields.SnapshotStatus.AVAILABLE snapshot.create() return snapshot diff --git a/cinder/tests/unit/test_volume.py b/cinder/tests/unit/test_volume.py index 3b8b1a9d4..f100e50f7 100644 --- a/cinder/tests/unit/test_volume.py +++ b/cinder/tests/unit/test_volume.py @@ -5845,7 +5845,6 @@ class GetActiveByWindowTestCase(BaseVolumeTestCase): self.db_snap_attrs = [ { 'id': fake.SNAPSHOT_ID, - 'host': 'devstack', 'project_id': 'p1', 'created_at': datetime.datetime(1, 1, 1, 1, 1, 1), 'deleted': True, @@ -5856,7 +5855,6 @@ class GetActiveByWindowTestCase(BaseVolumeTestCase): { 'id': fake.SNAPSHOT2_ID, - 'host': 'devstack', 'project_id': 'p1', 'created_at': datetime.datetime(1, 1, 1, 1, 1, 1), 'deleted': True, @@ -5866,7 +5864,6 @@ class GetActiveByWindowTestCase(BaseVolumeTestCase): }, { 'id': fake.SNAPSHOT3_ID, - 'host': 'devstack', 'project_id': 'p1', 'created_at': datetime.datetime(1, 1, 1, 1, 1, 1), 'deleted': True, @@ -5876,14 +5873,12 @@ class GetActiveByWindowTestCase(BaseVolumeTestCase): }, { 'id': fake.SNAPSHOT_ID, - 'host': 'devstack', 'project_id': 'p1', 'created_at': datetime.datetime(1, 3, 10, 1, 1, 1), 'volume_id': fake.VOLUME_ID, }, { 'id': fake.SNAPSHOT2_ID, - 'host': 'devstack', 'project_id': 'p1', 'created_at': datetime.datetime(1, 5, 1, 1, 1, 1), 'volume_id': fake.VOLUME_ID