cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [3/3] git commit: refs/heads/bvt - marvin changes to do an pre-integration and integration test
Date Thu, 21 Mar 2013 14:32:56 GMT
marvin changes to do an pre-integration and integration test

Signed-off-by: Prasanna Santhanam <tsp@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4cb55bdd
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4cb55bdd
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4cb55bdd

Branch: refs/heads/bvt
Commit: 4cb55bddc7cb5283bdfd51cd1ed10d06088bdf0f
Parents: 23a9a09
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Thu Mar 21 20:02:23 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Thu Mar 21 20:02:23 2013 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_vm_life_cycle.py |   14 +++--
 tools/marvin/marvin/testSetupSuccess.py      |    8 ++-
 tools/marvin/pom.xml                         |   65 ++++++++++++++-------
 3 files changed, 60 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4cb55bdd/test/integration/smoke/test_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_life_cycle.py b/test/integration/smoke/test_vm_life_cycle.py
index 719984d..143fea7 100644
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@ -20,7 +20,6 @@
 import marvin
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
-from marvin.remoteSSHClient import remoteSSHClient
 from marvin.integration.lib.utils import *
 from marvin.integration.lib.base import *
 from marvin.integration.lib.common import *
@@ -177,7 +176,7 @@ class TestDeployVM(cloudstackTestCase):
                         self.account
                         ]
 
-    @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"])
+    @attr(tags = ["simulator", "devcloud", "advanced", "advancedns", "smoke", "basic", "sg"])
     def test_deploy_vm(self):
         """Test Deploy Virtual Machine
         """
@@ -231,6 +230,13 @@ class TestDeployVM(cloudstackTestCase):
                     self.virtual_machine.name,
                     "Check virtual machine name in listVirtualMachines"
                     )
+
+        self.assertEqual(
+            vm_response.state,
+            'Running',
+             msg="VM is not in Running state"
+        )
+
         return
 
     def tearDown(self):
@@ -996,6 +1002,4 @@ class TestVMLifeCycle(cloudstackTestCase):
                          False,
                          "Check if ISO is detached from virtual machine"
                          )
-        return
-
-
+        return
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4cb55bdd/tools/marvin/marvin/testSetupSuccess.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/testSetupSuccess.py b/tools/marvin/marvin/testSetupSuccess.py
index c4f2e39..90717dc 100644
--- a/tools/marvin/marvin/testSetupSuccess.py
+++ b/tools/marvin/marvin/testSetupSuccess.py
@@ -75,7 +75,13 @@ class TestSetupSuccess(cloudstackTestCase):
                 retry = retry - 1
                 delay(60) #wait a minute for retry
             self.assertNotEqual(retry, 0, "builtIn templates not ready in zone %s"%z.name)
-            
+
+    def test_deployVmWithBuiltIn(self):
+        """
+        Deploys a VM with the built-in CentOS template
+        """
     @classmethod
     def tearDownClass(cls):
         pass
+
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4cb55bdd/tools/marvin/pom.xml
----------------------------------------------------------------------
diff --git a/tools/marvin/pom.xml b/tools/marvin/pom.xml
index a3bd546..7262580 100644
--- a/tools/marvin/pom.xml
+++ b/tools/marvin/pom.xml
@@ -48,8 +48,8 @@
         <version>1.2.1</version>
         <executions>
           <execution>
-            <id>compile</id>
-            <phase>compile</phase>
+            <id>generate-sources</id>
+            <phase>generate-sources</phase>
             <goals>
               <goal>exec</goal>
             </goals>
@@ -80,7 +80,6 @@
             </configuration>
           </execution>
         </executions>
-
       </plugin>
     </plugins>
   </build>
@@ -88,7 +87,9 @@
     <profile>
       <id>marvin</id>
       <activation>
-        <property><name>marvin.config</name></property>
+        <property>
+          <name>marvin.config</name>
+        </property>
       </activation>
       <build>
         <plugins>
@@ -96,27 +97,49 @@
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>exec-maven-plugin</artifactId>
             <version>1.2.1</version>
-            <configuration>
-              <workingDirectory>${basedir}/marvin</workingDirectory>
-              <executable>python</executable>
-              <arguments>
-                <argument>deployAndRun.py</argument>
-                <argument>-c</argument>
-                <argument>${user.dir}/${marvin.config}</argument>
-                <argument>-t</argument>
-                <argument>/tmp/t.log</argument>
-                <argument>-r</argument>
-                <argument>/tmp/r.log</argument>
-                <argument>-f</argument>
-                <argument>${basedir}/marvin/testSetupSuccess.py</argument>
-              </arguments>
-            </configuration>
             <executions>
               <execution>
-                <phase>test</phase>
+                <id>pre-integration-test</id>
+                <phase>pre-integration-test</phase>
+                <goals>
+                  <goal>exec</goal>
+                </goals>
+                <configuration>
+                  <workingDirectory>${basedir}/marvin</workingDirectory>
+                  <executable>python</executable>
+                  <arguments>
+                    <argument>deployAndRun.py</argument>
+                    <argument>-c</argument>
+                    <argument>${user.dir}/${marvin.config}</argument>
+                    <argument>-t</argument>
+                    <argument>/tmp/t.log</argument>
+                    <argument>-r</argument>
+                    <argument>/tmp/r.log</argument>
+                    <argument>-f</argument>
+                    <argument>${basedir}/marvin/testSetupSuccess.py</argument>
+                  </arguments>
+                </configuration>
+              </execution>
+              <execution>
+                <id>integration-test</id>
+                <phase>integration-test</phase>
                 <goals>
                   <goal>exec</goal>
                 </goals>
+                <configuration>
+                  <workingDirectory>${basedir}/marvin</workingDirectory>
+                  <executable>python</executable>
+                  <arguments>
+                    <argument>/usr/local/bin/nosetests</argument>
+                    <argument>--with-marvin</argument>
+                    <argument>--marvin-config</argument>
+                    <argument>${user.dir}/${marvin.config}</argument>
+                    <argument>--load</argument>
+                    <argument>-a</argument>
+                    <argument>tags=simulator</argument>
+                    <argument>${basedir}/../../test/integration/smoke/test_vm_life_cycle.py</argument>
+                  </arguments>
+                </configuration>
               </execution>
             </executions>
           </plugin>
@@ -124,4 +147,4 @@
       </build>
     </profile>
   </profiles>
-</project>
+</project>
\ No newline at end of file


Mime
View raw message