Skip to content

Commit 8ac3384

Browse files
committed
Simplify Scriptler test
1 parent e2adca5 commit 8ac3384

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/main/java/org/jenkinsci/test/acceptance/plugins/scriptler/ScriptResult.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@
2323
*/
2424
package org.jenkinsci.test.acceptance.plugins.scriptler;
2525

26-
import java.util.List;
27-
import java.util.Objects;
2826
import java.util.regex.Matcher;
2927
import java.util.regex.Pattern;
3028
import org.jenkinsci.test.acceptance.po.Jenkins;
3129
import org.jenkinsci.test.acceptance.po.Node;
3230

3331
public class ScriptResult {
34-
private static final List<String> BUILT_IN_NODE_NAMES = List.of("built-in", "controller", "master");
3532
private final String result;
3633

3734
public ScriptResult(String result) {
@@ -41,14 +38,7 @@ public ScriptResult(String result) {
4138
public String output(Node node) {
4239
String name = node.getName();
4340
if (node instanceof Jenkins) {
44-
// TODO: use the below code once Scriptler versions 390 and up are the only ones tested
45-
// return "(" + node + ")";
46-
return BUILT_IN_NODE_NAMES.stream()
47-
.map(nodeName -> "(" + nodeName + ")")
48-
.map(this::output)
49-
.filter(Objects::nonNull)
50-
.findFirst()
51-
.orElse(null);
41+
name = "(" + node.getName() + ")";
5242
}
5343
return output(name);
5444
}

0 commit comments

Comments
 (0)