From f8823046cc795b7e75bb188295f6cbe8c956f642 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Sun, 12 Nov 2023 07:58:34 -0700 Subject: [PATCH] Accept test run on any agent (#1525) Test condition does not require an agent so there is no benefit to declaring the name of a specific agent. Any agent is sufficient for this test. --- src/test/java/hudson/plugins/git/Security2478Test.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/hudson/plugins/git/Security2478Test.java b/src/test/java/hudson/plugins/git/Security2478Test.java index 731b5a40ef..b7476342e1 100644 --- a/src/test/java/hudson/plugins/git/Security2478Test.java +++ b/src/test/java/hudson/plugins/git/Security2478Test.java @@ -45,7 +45,7 @@ public void checkoutShouldNotAbortWhenLocalSourceAndRunningOnAgent() throws Exce sampleRepo.git("commit", "--all", "--message=test commit"); WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "pipeline"); - String script = "node('slave0') {\n" + + String script = "node {\n" + " checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[url: '" + sampleRepo.fileUrl() + "', credentialsId: '']]])\n" + "}"; p.setDefinition(new CpsFlowDefinition(script, true));