Allon Mureinik has uploaded a new change for review.

Change subject: core: VdsInstallerSSHTest: assume POSIX
......................................................................

core: VdsInstallerSSHTest: assume POSIX

VdsInstallerSSHTest implicitly assumes POSIX compliant SSH handling of
the local OS.
This patch makes that assumption explicit (using org.junit.Assume) in
order to prevent the test from failing on OSs it can't run on.

Change-Id: I9fd29845da489836d4b8bc19449be54f30fa5e7a
Signed-off-by: Allon Mureinik <[email protected]>
---
M 
backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/hostinstall/VdsInstallerSSHTest.java
1 file changed, 12 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/88/8188/1

diff --git 
a/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/hostinstall/VdsInstallerSSHTest.java
 
b/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/hostinstall/VdsInstallerSSHTest.java
index 1a6abb3..d385f85 100644
--- 
a/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/hostinstall/VdsInstallerSSHTest.java
+++ 
b/backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/hostinstall/VdsInstallerSSHTest.java
@@ -1,20 +1,26 @@
 package org.ovirt.engine.core.utils.hostinstall;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeNotNull;
+import static org.junit.Assume.assumeTrue;
+
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
-import java.io.InputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.OutputStream;
 import java.security.KeyStore;
 
+import org.apache.commons.lang.SystemUtils;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.Assume;
-import static org.junit.Assert.*;
-
 import org.ovirt.engine.core.common.config.Config;
 import org.ovirt.engine.core.common.config.ConfigValues;
 import org.ovirt.engine.core.common.config.IConfigUtilsInterface;
@@ -96,6 +102,7 @@
 
     @Before
     public void setup() throws IOException {
+        assumeTrue(SystemUtils.IS_OS_UNIX);
         IConfigUtilsInterface confInstance = new DefaultValuesConfigUtil();
         Config.setConfigUtils(confInstance);
 
@@ -512,7 +519,7 @@
 
     @Test
     public void testFingerprint() throws Exception {
-        Assume.assumeNotNull(sshd);
+        assumeNotNull(sshd);
         VdsInstallerSSH vdsi = new VdsInstallerSSH();
         vdsi.setPort(port);
         try {


--
To view, visit http://gerrit.ovirt.org/8188
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9fd29845da489836d4b8bc19449be54f30fa5e7a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to