Skip to content

Commit ad1eb64

Browse files
committed
add test ensuring PainlessPlugin#baseWhiteList() remains stable-API
1 parent 891166c commit ad1eb64

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
7+
*/
8+
9+
package org.elasticsearch.painless;
10+
11+
import org.elasticsearch.painless.spi.Whitelist;
12+
import org.elasticsearch.test.ESTestCase;
13+
14+
import java.util.List;
15+
16+
import static org.hamcrest.Matchers.empty;
17+
import static org.hamcrest.Matchers.is;
18+
import static org.hamcrest.Matchers.not;
19+
20+
public class PainlessPluginTests extends ESTestCase {
21+
22+
/**
23+
* The {@link PainlessPlugin#baseWhiteList()} signature is relied on from outside
24+
* the Elasticsearch code-base and is considered part of the plugin's external API.
25+
*/
26+
public void testBaseWhiteList() {
27+
final List<Whitelist> baseWhiteList = PainlessPlugin.baseWhiteList();
28+
assertThat(baseWhiteList, is(not(empty())));
29+
}
30+
}

0 commit comments

Comments
 (0)