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 15:05:36 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-2.x 21e0eaec0 -> 29932d779


[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/29932d77
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/29932d77
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/29932d77

Branch: refs/heads/karaf-2.x
Commit: 29932d7799c72dc3b9e3af6cc6df2a2a3e86d0c3
Parents: 21e0eae
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Mon Jan 5 16:04:53 2015 +0100
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Mon Jan 5 16:04:53 2015 +0100

----------------------------------------------------------------------
 .../test/java/org/apache/karaf/itests/SshCommandTestBase.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/29932d77/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 a2004d4..77cf1bd 100644
--- a/itests/src/test/java/org/apache/karaf/itests/SshCommandTestBase.java
+++ b/itests/src/test/java/org/apache/karaf/itests/SshCommandTestBase.java
@@ -118,12 +118,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