Skip to content

Commit 6e48666

Browse files
committed
[chore] Remove deps on SSH credentials implementations
1 parent a2ddfba commit 6e48666

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/test/java/org/jenkinsci/plugins/trileadapi/TrileadSSHPasswordAuthenticatorTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator;
2727
import com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticatorFactory;
2828
import com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPassword;
29-
import com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPasswordAuthenticator;
3029
import com.cloudbees.plugins.credentials.CredentialsScope;
3130
import com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials;
3231
import com.trilead.ssh2.Connection;
@@ -83,8 +82,8 @@ public void tearDown() {
8382
public void dontTestKeyboardInteractive() throws Exception {
8483
connection = new Connection("localhost");
8584
connection.connect(new NoVerifier());
86-
com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPasswordAuthenticator instance =
87-
new com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPasswordAuthenticator(connection, new BasicSSHUserPassword(CredentialsScope.SYSTEM,
85+
TrileadSSHPasswordAuthenticator instance =
86+
new TrileadSSHPasswordAuthenticator(connection, new BasicSSHUserPassword(CredentialsScope.SYSTEM,
8887
null, "....", // <---- put your username here
8988
"....", // <---- put your password here
9089
null));
@@ -105,7 +104,7 @@ public void testPassword() throws Exception {
105104
int port = (Integer)invoke(sshd, "getPort", null, null);
106105
connection = new Connection("localhost", port);
107106
connection.connect(new NoVerifier());
108-
com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPasswordAuthenticator instance =
107+
TrileadSSHPasswordAuthenticator instance =
109108
new TrileadSSHPasswordAuthenticator(connection, user);
110109
assertThat(instance.getAuthenticationMode(), is(SSHAuthenticator.Mode.AFTER_CONNECT));
111110
assertThat(instance.canAuthenticate(), is(true));

src/test/java/org/jenkinsci/plugins/trileadapi/TrileadSSHPublicKeyAuthenticatorTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator;
2727
import com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey;
28-
import com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPublicKeyAuthenticator;
2928
import com.cloudbees.plugins.credentials.CredentialsDescriptor;
3029
import com.cloudbees.plugins.credentials.CredentialsScope;
3130
import com.cloudbees.plugins.credentials.common.StandardUsernameCredentials;
@@ -148,7 +147,7 @@ public void testAuthenticate() throws Exception {
148147
int port = (Integer)invoke(sshd, "getPort", null, null);
149148
connection = new Connection("localhost", port);
150149
connection.connect((hostname, port1, serverHostKeyAlgorithm, serverHostKey) -> true);
151-
com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPublicKeyAuthenticator instance =
150+
TrileadSSHPublicKeyAuthenticator instance =
152151
new TrileadSSHPublicKeyAuthenticator(connection, user);
153152
assertThat(instance.getAuthenticationMode(), is(SSHAuthenticator.Mode.AFTER_CONNECT));
154153
assertThat(instance.canAuthenticate(), is(true));

0 commit comments

Comments
 (0)