karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject karaf git commit: [KARAF-3414] Remove usage of deprecated ssh methods in itest
Date Mon, 05 Jan 2015 14:31:22 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-3.0.x 3835b37b4 -> d09f0acdc


[KARAF-3414] Remove usage of deprecated ssh methods in itest


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

Branch: refs/heads/karaf-3.0.x
Commit: d09f0acdce2c4a2d8b7cbb63ed5d01d7d4a186b0
Parents: 3835b37
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Mon Jan 5 15:30:49 2015 +0100
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Mon Jan 5 15:30:49 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/karaf/itests/SshCommandTestBase.java     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/d09f0acd/itests/src/test/java/org/apache/karaf/itests/SshCommandTestBase.java
----------------------------------------------------------------------
diff --git a/itests/src/test/java/org/apache/karaf/itests/SshCommandTestBase.java b/itests/src/test/java/org/apache/karaf/itests/SshCommandTestBase.java
index adc1cc0..eaf5cda 100644
--- a/itests/src/test/java/org/apache/karaf/itests/SshCommandTestBase.java
+++ b/itests/src/test/java/org/apache/karaf/itests/SshCommandTestBase.java
@@ -21,8 +21,6 @@ import java.io.PipedOutputStream;
 import java.util.Arrays;
 import java.util.HashSet;
 
-import junit.framework.Assert;
-
 import org.apache.karaf.features.Feature;
 import org.apache.sshd.ClientChannel;
 import org.apache.sshd.ClientSession;
@@ -30,6 +28,7 @@ import org.apache.sshd.SshClient;
 import org.apache.sshd.client.future.ConnectFuture;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Assert;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.junit.PaxExam;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
@@ -117,12 +116,13 @@ public class SshCommandTestBase extends KarafTestSupport {
     private OutputStream openSshChannel(String username, String password, OutputStream ...
outputs) throws Exception {
         client = SshClient.setUpDefaultClient();
         client.start();
-        ConnectFuture future = client.connect("localhost", 8101).await();
+        ConnectFuture future = client.connect(username, "localhost", 8101).await();
         session = future.getSession();
 
         int ret = ClientSession.WAIT_AUTH;
         while ((ret & ClientSession.WAIT_AUTH) != 0) {
-            session.authPassword(username, password);
+            session.addPasswordIdentity(password);
+            session.auth().verify();
             ret = session.waitFor(ClientSession.WAIT_AUTH | ClientSession.CLOSED | ClientSession.AUTHED,
0);
         }
         if ((ret & ClientSession.CLOSED) != 0) {


Mime
View raw message