Skip to content

Commit 0b2deb0

Browse files
committed
Add FreeBSD as valid OS for cluster tests
1 parent 061b471 commit 0b2deb0

File tree

1 file changed

+11
-1
lines changed
  • test/test-clusters/src/main/java/org/elasticsearch/test/cluster/util

1 file changed

+11
-1
lines changed

test/test-clusters/src/main/java/org/elasticsearch/test/cluster/util/OS.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
public enum OS {
2020
WINDOWS,
2121
MAC,
22-
LINUX;
22+
LINUX,
23+
FREEBSD;
2324

2425
public static OS current() {
2526
String os = System.getProperty("os.name", "");
@@ -32,6 +33,9 @@ public static OS current() {
3233
if (os.startsWith("Mac")) {
3334
return OS.MAC;
3435
}
36+
if (os.startsWith("FreeBSD")) {
37+
return OS.FREEBSD;
38+
}
3539
throw new IllegalStateException("Can't determine OS from: " + os);
3640
}
3741

@@ -54,9 +58,15 @@ public Conditional<T> onMac(Supplier<? extends T> supplier) {
5458
return this;
5559
}
5660

61+
public Conditional<T> onFreeBSD(Supplier<? extends T> supplier) {
62+
conditions.put(FREEBSD, supplier);
63+
return this;
64+
}
65+
5766
public Conditional<T> onUnix(Supplier<? extends T> supplier) {
5867
conditions.put(MAC, supplier);
5968
conditions.put(LINUX, supplier);
69+
conditions.put(FREEBSD, supplier);
6070
return this;
6171
}
6272

0 commit comments

Comments
 (0)