cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sw...@apache.org
Subject [2/4] git commit: updated refs/heads/master to 821b2da
Date Fri, 13 May 2016 15:10:21 GMT
CLOUDSTACK-9299: Fix test failures on CI

- Fixes oobm integration test to skip if known ipmitool bug is hit
- Fixes ProcessTest unit test case to use sleep
- Removes redundant unit test that covers code in ProcessTest

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/master
Commit: ae0f169123158c23898316a32b413f4647d0c456
Parents: 540d957
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Fri May 13 09:09:58 2016 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Fri May 13 09:47:32 2016 +0530

----------------------------------------------------------------------
 .../driver/ipmitool/IpmitoolWrapperTest.java             | 11 +----------
 test/integration/smoke/test_outofbandmanagement.py       |  9 +++++++--
 .../org/apache/cloudstack/utils/process/ProcessTest.java |  3 +--
 3 files changed, 9 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae0f1691/plugins/outofbandmanagement-drivers/ipmitool/test/org/apache/cloudstack/outofbandmanagement/driver/ipmitool/IpmitoolWrapperTest.java
----------------------------------------------------------------------
diff --git a/plugins/outofbandmanagement-drivers/ipmitool/test/org/apache/cloudstack/outofbandmanagement/driver/ipmitool/IpmitoolWrapperTest.java
b/plugins/outofbandmanagement-drivers/ipmitool/test/org/apache/cloudstack/outofbandmanagement/driver/ipmitool/IpmitoolWrapperTest.java
index 86eff86..26115f7 100644
--- a/plugins/outofbandmanagement-drivers/ipmitool/test/org/apache/cloudstack/outofbandmanagement/driver/ipmitool/IpmitoolWrapperTest.java
+++ b/plugins/outofbandmanagement-drivers/ipmitool/test/org/apache/cloudstack/outofbandmanagement/driver/ipmitool/IpmitoolWrapperTest.java
@@ -23,13 +23,11 @@ import com.cloud.utils.concurrency.NamedThreadFactory;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.google.common.collect.ImmutableMap;
 import org.apache.cloudstack.outofbandmanagement.OutOfBandManagement;
-import org.apache.cloudstack.outofbandmanagement.driver.OutOfBandManagementDriverResponse;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.runners.MockitoJUnitRunner;
 
-import java.util.Arrays;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -105,11 +103,4 @@ public class IpmitoolWrapperTest {
         Assert.assertEquals(IPMITOOL.findIpmiUser(usersList, "operator"), "2");
         Assert.assertEquals(IPMITOOL.findIpmiUser(usersList, "user"), "3");
     }
-
-    @Test
-    public void testExecuteCommands() {
-        OutOfBandManagementDriverResponse r = IPMITOOL.executeCommands(Arrays.asList("ls",
"/tmp"));
-        Assert.assertTrue(r.isSuccess());
-        Assert.assertTrue(r.getResult().length() > 0);
-    }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae0f1691/test/integration/smoke/test_outofbandmanagement.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_outofbandmanagement.py b/test/integration/smoke/test_outofbandmanagement.py
index 7c2aa6b..0f0f442 100644
--- a/test/integration/smoke/test_outofbandmanagement.py
+++ b/test/integration/smoke/test_outofbandmanagement.py
@@ -557,8 +557,13 @@ class TestOutOfBandManagement(cloudstackTestCase):
         cmd = changeOutOfBandManagementPassword.changeOutOfBandManagementPasswordCmd()
         cmd.hostid = self.getHost().id
         cmd.password = "Password12345"
-        response = self.apiclient.changeOutOfBandManagementPassword(cmd)
-        self.assertEqual(response.status, True)
+        try:
+            response = self.apiclient.changeOutOfBandManagementPassword(cmd)
+            self.assertEqual(response.status, True)
+        except Exception as e:
+            if "packet session id 0x0 does not match active session" in str(e):
+                raise self.skipTest("Known ipmitool issue hit, skipping test")
+            raise e
 
         bmc = IpmiServerContext().bmc
         bmc.powerstate = 'on'

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae0f1691/utils/src/test/java/org/apache/cloudstack/utils/process/ProcessTest.java
----------------------------------------------------------------------
diff --git a/utils/src/test/java/org/apache/cloudstack/utils/process/ProcessTest.java b/utils/src/test/java/org/apache/cloudstack/utils/process/ProcessTest.java
index b5e6e04..2c158c8 100644
--- a/utils/src/test/java/org/apache/cloudstack/utils/process/ProcessTest.java
+++ b/utils/src/test/java/org/apache/cloudstack/utils/process/ProcessTest.java
@@ -39,10 +39,9 @@ public class ProcessTest {
 
     @Test
     public void testProcessRunner() {
-        ProcessResult result = RUNNER.executeCommands(Arrays.asList("ls", "/tmp"));
+        ProcessResult result = RUNNER.executeCommands(Arrays.asList("sleep", "0"));
         Assert.assertEquals(result.getReturnCode(), 0);
         Assert.assertTrue(Strings.isNullOrEmpty(result.getStdError()));
-        Assert.assertTrue(result.getStdOutput().length() > 0);
     }
 
     @Test


Mime
View raw message