You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/08/19 11:30:34 UTC
git commit: updated refs/heads/master to f13a6a0
Updated Branches:
refs/heads/master 12380835b -> f13a6a0de
CLOUDSTACK-4225: Fix template references in setUpClass
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
(cherry picked from commit 7768613edc4f9ae0787e555f2bf4bd2fb42a4c6e)
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f13a6a0d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f13a6a0d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f13a6a0d
Branch: refs/heads/master
Commit: f13a6a0deb6f58f4c2edbaadbfa9d32704017843
Parents: 1238083
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Aug 19 14:59:34 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Aug 19 15:00:21 2013 +0530
----------------------------------------------------------------------
test/integration/component/test_snapshot_gc.py | 4 ++--
.../component/test_snapshot_limits.py | 4 ++--
test/integration/component/test_snapshots.py | 20 ++++++++++----------
3 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f13a6a0d/test/integration/component/test_snapshot_gc.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_snapshot_gc.py b/test/integration/component/test_snapshot_gc.py
index 9d436e9..d9af966 100644
--- a/test/integration/component/test_snapshot_gc.py
+++ b/test/integration/component/test_snapshot_gc.py
@@ -264,6 +264,7 @@ class TestAccountSnapshotClean(cloudstackTestCase):
self.services["paths"]["mount_dir"]
),
"cd %s" % self.services["paths"]["mount_dir"],
+ "ls -Rt",
"ls %s" % (
snapshotPath
),
@@ -285,8 +286,7 @@ class TestAccountSnapshotClean(cloudstackTestCase):
except Exception as e:
self.fail("SSH failed for management server: %s - %s" %
(self.config.mgtSvr[0].mgtSvrIp, e))
- res = str(snapshots)
- return res.count(snapshot_id) == 1
+ return snapshots.count(snapshot_id) == 1
@attr(speed = "slow")
@attr(tags = ["advanced", "advancedns", "basic", "sg"])
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f13a6a0d/test/integration/component/test_snapshot_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_snapshot_limits.py b/test/integration/component/test_snapshot_limits.py
index c1d8e8e..52d9189 100644
--- a/test/integration/component/test_snapshot_limits.py
+++ b/test/integration/component/test_snapshot_limits.py
@@ -252,6 +252,7 @@ class TestSnapshotLimit(cloudstackTestCase):
self.services["paths"]["mount_dir"]
),
"cd %s" % self.services["paths"]["mount_dir"],
+ "ls -Rt",
"ls %s" % (
snapshotPath
),
@@ -273,8 +274,7 @@ class TestSnapshotLimit(cloudstackTestCase):
except Exception as e:
self.fail("SSH failed for management server: %s - %s" %
(self.config.mgtSvr[0].mgtSvrIp, e))
- res = str(snapshots)
- return res.count(snapshot_id) == 1
+ return snapshots.count(snapshot_id) == 1
@attr(speed = "slow")
@attr(tags = ["advanced", "advancedns"])
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f13a6a0d/test/integration/component/test_snapshots.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_snapshots.py b/test/integration/component/test_snapshots.py
index b97a83a..4cb4aa6 100644
--- a/test/integration/component/test_snapshots.py
+++ b/test/integration/component/test_snapshots.py
@@ -134,7 +134,7 @@ class TestSnapshots(cloudstackTestCase):
cls.api_client,
cls.services["disk_offering"]
)
- template = get_template(
+ cls.template = get_template(
cls.api_client,
cls.zone.id,
cls.services["ostype"]
@@ -146,7 +146,7 @@ class TestSnapshots(cloudstackTestCase):
cls.services["server_without_disk"]["zoneid"] = cls.zone.id
- cls.services["templates"]["ostypeid"] = template.ostypeid
+ cls.services["templates"]["ostypeid"] = cls.template.ostypeid
cls.services["zoneid"] = cls.zone.id
cls.services["diskoffering"] = cls.disk_offering.id
@@ -167,7 +167,7 @@ class TestSnapshots(cloudstackTestCase):
VirtualMachine.create(
cls.api_client,
cls.services["server_with_disk"],
- templateid=template.id,
+ templateid=cls.template.id,
accountid=cls.account.name,
domainid=cls.account.domainid,
serviceofferingid=cls.service_offering.id,
@@ -177,7 +177,7 @@ class TestSnapshots(cloudstackTestCase):
VirtualMachine.create(
cls.api_client,
cls.services["server_without_disk"],
- templateid=template.id,
+ templateid=cls.template.id,
accountid=cls.account.name,
domainid=cls.account.domainid,
serviceofferingid=cls.service_offering.id,
@@ -244,6 +244,7 @@ class TestSnapshots(cloudstackTestCase):
self.services["paths"]["mount_dir"]
),
"cd %s" % self.services["paths"]["mount_dir"],
+ "ls -Rt",
"ls %s" % (
snapshotPath
),
@@ -265,8 +266,7 @@ class TestSnapshots(cloudstackTestCase):
except Exception as e:
self.fail("SSH failed for management server: %s - %s" %
(self.config.mgtSvr[0].mgtSvrIp, e))
- res = str(snapshots)
- return res.count(snapshot_id) == 1
+ return snapshots.count(snapshot_id) == 1
@classmethod
def tearDownClass(cls):
@@ -667,7 +667,7 @@ class TestSnapshots(cloudstackTestCase):
self.services["volume"]["diskdevice"],
self.services["paths"]["mount_dir"]
),
- "pushd %s" % self.services["mount_dir"],
+ "pushd %s" % self.services["paths"]["mount_dir"],
"mkdir -p %s/{%s,%s} " % (
self.services["sub_dir"],
self.services["sub_lvl_dir1"],
@@ -924,7 +924,7 @@ class TestSnapshots(cloudstackTestCase):
)
# Unmount the volume
cmds = [
- "umount %s" % (self.services["mount_dir"]),
+ "umount %s" % (self.services["paths"]["mount_dir"]),
]
try:
for c in cmds:
@@ -1051,6 +1051,7 @@ class TestCreateVMSnapshotTemplate(cloudstackTestCase):
self.services["paths"]["mount_dir"]
),
"cd %s" % self.services["paths"]["mount_dir"],
+ "ls -Rt",
"ls %s" % (
snapshotPath
),
@@ -1072,8 +1073,7 @@ class TestCreateVMSnapshotTemplate(cloudstackTestCase):
except Exception as e:
self.fail("SSH failed for management server: %s - %s" %
(self.services["mgmt_server"]["ipaddress"], e))
- res = str(snapshots)
- return res.count(snapshot_id) == 1
+ return snapshots.count(snapshot_id) == 1
@attr(speed = "slow")
@attr(tags = ["advanced", "advancedns"])