Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update unit-tests to cope with recent changes in jenkins/ssh-agent docker image. #858

Merged
merged 1 commit into from
Sep 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,20 @@
public class DockerComputerSSHConnectorTest extends DockerComputerConnectorTest {

private static final String SSH_AGENT_IMAGE_IMAGENAME = "jenkins/ssh-agent";
private static final String SSH_AGENT_IMAGE_JAVAPATH = "/usr/local/openjdk-8/bin/java";
/**
* Where the JDK can be found.
* <p>
* <b>MAINTENANCE NOTE:</b> Originally, Java was on the PATH and the SSH
* connector found it there. Then, the image changed and java wasn't on the path
* anymore and had to be set in the unit-tests to
* <code>"/usr/local/openjdk-8/bin/java"</code>. Then, the image changed again
* and java was on the path again but had moved.
* </p>
* TL;DR: If java is on the path then this can (and should) be null, but if it
* isn't on the path then we'll need to set this to where java has been moved
* to.
*/
private static final String SSH_AGENT_IMAGE_JAVAPATH = null;

@Test
public void connectAgentViaSSHUsingInjectSshKey() throws Exception {
Expand Down