Skip to content

Commit

Permalink
Bind credentials (#277)
Browse files Browse the repository at this point in the history
* Bind credentials

* fiix versions

* adjust test
  • Loading branch information
KostyaSha committed Oct 20, 2019
1 parent e255ead commit d1e06e4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions yet-another-docker-its/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.github.kostyasha.yet-another-docker</groupId>
<artifactId>yet-another-docker-parent</artifactId>
<version>0.1.4-SNAPSHOT</version>
<version>0.1.5-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

Expand All @@ -26,15 +26,15 @@
<groupId>com.github.kostyasha.yet-another-docker</groupId>
<artifactId>yet-another-docker-plugin</artifactId>
<!--<version>${project.version}</version>-->
<version>0.1.4-SNAPSHOT</version>
<version>0.1.5-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>com.github.kostyasha.yet-another-docker</groupId>
<artifactId>yet-another-docker-java</artifactId>
<!--TODO cleanup? dep fails with variable reference -->
<!--<version>${project.version}</version>-->
<version>0.1.4-SNAPSHOT</version>
<version>0.1.5-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>com.github.docker-java</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public class DockerSSHConnector extends ComputerConnector {
@DataBoundConstructor
public DockerSSHConnector(int port,
StandardUsernameCredentials credentials,
String credentialsId,
String jvmOptions,
String javaPath,
JDKInstaller jdkInstaller,
Expand All @@ -110,7 +111,7 @@ public DockerSSHConnector(int port,
this.jvmOptions = jvmOptions;
this.port = port == 0 ? 22 : port;
this.credentials = credentials;
this.credentialsId = credentials == null ? null : this.credentials.getId();
this.credentialsId = credentialsId;
this.javaPath = javaPath;
this.jdkInstaller = jdkInstaller;
this.prefixStartSlaveCmd = fixEmpty(prefixStartSlaveCmd);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* @author lanwen (Merkushev Kirill)
*/
public class PortUtilsTest {
public class PortUtilsTest {

public static final int RETRY_COUNT = 2;
public static final int DELAY = (int) SECONDS.toMillis(6);
Expand Down Expand Up @@ -68,10 +68,10 @@ public void shouldWaitIfPortAvailableButNotSshUntilTimeoutAndThrowEx() throws Ex
long before = currentTimeMillis();
try {
create(server.host(), server.port()).withRetries(RETRY_COUNT)
.bySshWithEveryRetryWaitFor(DELAY, MILLISECONDS);
.bySshWithEveryRetryWaitFor(RETRY_DELAY, MILLISECONDS);
} catch (IOException e) {
assertThat("Should wait for timeout", new Date(currentTimeMillis()),
greaterThanOrEqualTo(new Date(before + RETRY_COUNT * DELAY)));
greaterThanOrEqualTo(new Date(before + RETRY_COUNT * RETRY_DELAY)));
throw e;
}
}
Expand Down

0 comments on commit d1e06e4

Please sign in to comment.