[
https://issues.apache.org/jira/browse/CLOUDSTACK-9128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15055528#comment-15055528
]
ASF GitHub Bot commented on CLOUDSTACK-9128:
--------------------------------------------
Github user pritisarap12 commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1199#discussion_r47465783
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -358,3 +362,129 @@ def test_01_storage_snapshots_limits(self):
)
return
+
+ @attr(tags=["advanced", "basic"], required_hardware="true")
+ def test_02_snapshot_size_check(self):
+ """ Check Snapshots size in database
+ 1. Create file on ROOT disk of deployed VM.
+ 2. Create Snapshot of ROOT disk.
+ 3. Check if physiacal_size parameter of snapshot_store_ref
table
+ has physical size of snapshot
+ """
+ if self.hypervisor.lower() not in ["xenserver", "vmware"]:
+ self.skipTest("Test not to be run on %s" % self.hypervisor)
+
+ root_volumes_list = list_volumes(
+ self.apiclient,
+ virtualmachineid=self.vm.id,
+ type=ROOT,
+ listall=True
+ )
+
+ status = validateList(root_volumes_list)
+ self.assertEqual(
+ status[0],
+ PASS,
+ "Check listVolumes response for ROOT Disk")
+
+ root_volume = root_volumes_list[0]
+
+ # Get Secondary Storage Value from Database
+ qryresult_before_snapshot = self.dbclient.execute(
+ " select id, account_name, secondaryStorageTotal\
+ from account_view where account_name = '%s';" %
+ self.account.name)
+
+ self.assertNotEqual(
+ len(qryresult_before_snapshot),
+ 0,
+ "Check sql query to return SecondaryStorageTotal of account")
+
+ storage_qry_result_old = qryresult_before_snapshot[0]
+ secondary_storage_old = storage_qry_result_old[2]
+
+ createChecksum(
+ self.testdata,
+ self.vm,
+ root_volume,
+ "rootdiskdevice")
+
+ time.sleep(30)
--- End diff --
createChecksum function logins the VM and performs some operation on VM
disk which takes some time, so wait for 30s is added there.
> Testcase to verify if snapshot_store_ref table stores actual size of back
> snapshot in secondary storage
> -------------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-9128
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9128
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Automation
> Affects Versions: 4.5.1
> Reporter: Priti Sarap
> Fix For: 4.5.1
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)