File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
test/test-clusters/src/main/java/org/elasticsearch/test/cluster/util Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 19
19
public enum OS {
20
20
WINDOWS ,
21
21
MAC ,
22
- LINUX ;
22
+ LINUX ,
23
+ FREEBSD ;
23
24
24
25
public static OS current () {
25
26
String os = System .getProperty ("os.name" , "" );
@@ -32,6 +33,9 @@ public static OS current() {
32
33
if (os .startsWith ("Mac" )) {
33
34
return OS .MAC ;
34
35
}
36
+ if (os .startsWith ("FreeBSD" )) {
37
+ return OS .FREEBSD ;
38
+ }
35
39
throw new IllegalStateException ("Can't determine OS from: " + os );
36
40
}
37
41
@@ -54,9 +58,15 @@ public Conditional<T> onMac(Supplier<? extends T> supplier) {
54
58
return this ;
55
59
}
56
60
61
+ public Conditional <T > onFreeBSD (Supplier <? extends T > supplier ) {
62
+ conditions .put (FREEBSD , supplier );
63
+ return this ;
64
+ }
65
+
57
66
public Conditional <T > onUnix (Supplier <? extends T > supplier ) {
58
67
conditions .put (MAC , supplier );
59
68
conditions .put (LINUX , supplier );
69
+ conditions .put (FREEBSD , supplier );
60
70
return this ;
61
71
}
62
72
You can’t perform that action at this time.
0 commit comments