rhtyd commented on a change in pull request #2258: Cloudstack 10064: Secondary 
storage Usage for uploadedVolume is not collected
URL: https://github.com/apache/cloudstack/pull/2258#discussion_r139642828
 
 

 ##########
 File path: test/integration/testpaths/Upload_Volume_test_case.py
 ##########
 @@ -0,0 +1,223 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+""" Test cases for checking that the secondary Storage usage is accounted. 
This is verified by making sure that storage_type=4 is added in the 
cloud_usage.usage_storage
+    table for a volume in 'Uploaded' state.
+
+    This test case:
+    1.Creates an account and uploads a volume.
+    2.After the volume is uploaded successfully, restarts the usage server.
+    3.Connectst ot the datbase
+    4.From the database verifies that an entry is added to 
cloud_usage.usage_storage table with storage_type=4 for the uploaded volume.
+    5.Clean up resources.
+"""
+
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.lib.utils import *
+from marvin.lib.base import *
+from marvin.lib.common import *
+from nose.plugins.attrib import attr
+from marvin.sshClient import SshClient
+from marvin.codes import (BACKED_UP, PASS, FAIL)
+import time
+
+
+def verify_vm(self, vmid, state):
 
 Review comment:
   @PranaliM can this test be moved to smoke or component test? What is the 
significant/usage of putting some tests in `integration/testpaths`?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to