Github user remibergsma commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1199#discussion_r47431243 --- 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 -- Can you please explain why we wait 30s here?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---