Skip to content

Commit

Permalink
fix: remove old code fro PCT (#543)
Browse files Browse the repository at this point in the history
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
kuisathaverat and dependabot[bot] authored Dec 20, 2024
1 parent a65c80f commit 48f216e
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;

import java.io.IOException;
Expand Down Expand Up @@ -111,15 +112,7 @@ public void testSubmitNotAuthorised() throws Exception {

jenkins.getInstance().addNode(agent);
SlaveComputer computer = (SlaveComputer) jenkins.getInstance().getComputer("test-agent");

try {
computer.connect(false).get();
} catch (ExecutionException ex){
//TODO(oleg_nenashev): "Slave" check is still needed for PCT purposes, but it should be eventually cleaned up
if (!ex.getMessage().startsWith("java.io.IOException: Slave failed") && !ex.getMessage().startsWith("java.io.IOException: Agent failed")) {
throw ex;
}
}
assertThrows(ExecutionException.class, () -> computer.connect(false).get());

List<TrustHostKeyAction> actions = computer.getActions(TrustHostKeyAction.class);
assertEquals(computer.getLog(), 1, actions.size());
Expand Down

0 comments on commit 48f216e

Please sign in to comment.