From 881987af286c9768b29f22c6cb28623227f16afe Mon Sep 17 00:00:00 2001 From: Francisco Javier Fernandez Gonzalez Date: Mon, 27 Nov 2017 09:16:47 +0100 Subject: [PATCH] [JENKINS-48232] Upgrading test dependencies --- pom.xml | 6 +++--- .../impl/JSchSSHPasswordAuthenticatorTest.java | 12 ++++++------ .../impl/JSchSSHPublicKeyAuthenticatorTest.java | 12 ++++++------ .../impl/TrileadSSHPasswordAuthenticatorTest.java | 10 +++++----- .../impl/TrileadSSHPublicKeyAuthenticatorTest.java | 14 +++++++------- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/pom.xml b/pom.xml index 7599fe8..9ec21e9 100644 --- a/pom.xml +++ b/pom.xml @@ -66,8 +66,8 @@ - 1.609 - 6 + 2.7.1 + 7 @@ -102,7 +102,7 @@ org.apache.sshd sshd-core - 0.12.0 + 1.6.0 test diff --git a/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/JSchSSHPasswordAuthenticatorTest.java b/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/JSchSSHPasswordAuthenticatorTest.java index 94a48b3..d2c9307 100644 --- a/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/JSchSSHPasswordAuthenticatorTest.java +++ b/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/JSchSSHPasswordAuthenticatorTest.java @@ -31,11 +31,11 @@ import com.jcraft.jsch.JSch; import com.jcraft.jsch.UserInfo; import hudson.model.Items; -import org.apache.sshd.SshServer; +import org.apache.sshd.server.SshServer; import org.apache.sshd.common.NamedFactory; -import org.apache.sshd.server.PasswordAuthenticator; -import org.apache.sshd.server.UserAuth; -import org.apache.sshd.server.auth.UserAuthPassword; +import org.apache.sshd.server.auth.password.PasswordAuthenticator; +import org.apache.sshd.server.auth.UserAuth; +import org.apache.sshd.server.auth.password.UserAuthPasswordFactory; import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider; import org.apache.sshd.server.session.ServerSession; import org.junit.After; @@ -104,7 +104,7 @@ public boolean authenticate(String username, String password, ServerSession sess return "foomanchu".equals(password); } }); - sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPassword.Factory())); + sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPasswordFactory())); try { sshd.start(); connector = new JSchConnector(user.getUsername(),"localhost", sshd.getPort()); @@ -136,7 +136,7 @@ public boolean authenticate(String username, String password, ServerSession sess return "foomanchu".equals(password); } }); - sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPassword.Factory())); + sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPasswordFactory())); try { sshd.start(); connector = new JSchConnector(user.getUsername(),"localhost", sshd.getPort()); diff --git a/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/JSchSSHPublicKeyAuthenticatorTest.java b/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/JSchSSHPublicKeyAuthenticatorTest.java index 3ae8007..1480a05 100644 --- a/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/JSchSSHPublicKeyAuthenticatorTest.java +++ b/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/JSchSSHPublicKeyAuthenticatorTest.java @@ -30,11 +30,11 @@ import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.NonNull; import hudson.util.Secret; -import org.apache.sshd.SshServer; +import org.apache.sshd.server.SshServer; import org.apache.sshd.common.NamedFactory; -import org.apache.sshd.server.PublickeyAuthenticator; -import org.apache.sshd.server.UserAuth; -import org.apache.sshd.server.auth.UserAuthPublicKey; +import org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator; +import org.apache.sshd.server.auth.UserAuth; +import org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory; import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider; import org.apache.sshd.server.session.ServerSession; import org.junit.After; @@ -145,7 +145,7 @@ public boolean authenticate(String username, PublicKey key, ServerSession sessio return username.equals("foobar"); } }); - sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPublicKey.Factory())); + sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPublicKeyFactory())); try { sshd.start(); connector = new JSchConnector(user.getUsername(), "localhost", sshd.getPort()); @@ -178,7 +178,7 @@ public boolean authenticate(String username, PublicKey key, ServerSession sessio return username.equals("foobar"); } }); - sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPublicKey.Factory())); + sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPublicKeyFactory())); try { sshd.start(); connector = new JSchConnector(user.getUsername(), "localhost", sshd.getPort()); diff --git a/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/TrileadSSHPasswordAuthenticatorTest.java b/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/TrileadSSHPasswordAuthenticatorTest.java index 3d6df14..234332e 100644 --- a/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/TrileadSSHPasswordAuthenticatorTest.java +++ b/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/TrileadSSHPasswordAuthenticatorTest.java @@ -34,11 +34,11 @@ import hudson.slaves.DumbSlave; import jenkins.security.MasterToSlaveCallable; -import org.apache.sshd.SshServer; +import org.apache.sshd.server.SshServer; import org.apache.sshd.common.NamedFactory; -import org.apache.sshd.server.PasswordAuthenticator; -import org.apache.sshd.server.UserAuth; -import org.apache.sshd.server.auth.UserAuthPassword; +import org.apache.sshd.server.auth.password.PasswordAuthenticator; +import org.apache.sshd.server.auth.UserAuth; +import org.apache.sshd.server.auth.password.UserAuthPasswordFactory; import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider; import org.apache.sshd.server.session.ServerSession; import org.junit.After; @@ -124,7 +124,7 @@ public boolean authenticate(String _username, String password, ServerSession ses return (username == null || username.equals(_username)) && "foomanchu".equals(password); } }); - sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPassword.Factory())); + sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPasswordFactory())); return sshd; } diff --git a/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/TrileadSSHPublicKeyAuthenticatorTest.java b/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/TrileadSSHPublicKeyAuthenticatorTest.java index 7d99889..f9c4f74 100644 --- a/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/TrileadSSHPublicKeyAuthenticatorTest.java +++ b/src/test/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/TrileadSSHPublicKeyAuthenticatorTest.java @@ -32,11 +32,11 @@ import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.NonNull; import hudson.util.Secret; -import org.apache.sshd.SshServer; +import org.apache.sshd.server.SshServer; import org.apache.sshd.common.NamedFactory; -import org.apache.sshd.server.PublickeyAuthenticator; -import org.apache.sshd.server.UserAuth; -import org.apache.sshd.server.auth.UserAuthPublicKey; +import org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator; +import org.apache.sshd.server.auth.UserAuth; +import org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory; import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider; import org.apache.sshd.server.session.ServerSession; import org.junit.After; @@ -145,7 +145,7 @@ public boolean authenticate(String username, PublicKey key, ServerSession sessio return username.equals("foobar"); } }); - sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPublicKey.Factory())); + sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPublicKeyFactory())); try { sshd.start(); connection = new Connection("localhost", sshd.getPort()); @@ -181,7 +181,7 @@ public boolean authenticate(String username, PublicKey key, ServerSession sessio return username.equals("foobar"); } }); - sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPublicKey.Factory())); + sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPublicKeyFactory())); try { sshd.start(); connection = new Connection("localhost", sshd.getPort()); @@ -216,7 +216,7 @@ public boolean authenticate(String username, PublicKey key, ServerSession sessio return username.equals("bill"); } }); - sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPublicKey.Factory())); + sshd.setUserAuthFactories(Arrays.>asList(new UserAuthPublicKeyFactory())); try { sshd.start(); connection = new Connection("localhost", sshd.getPort());