converted version check into a regular test class
Original commit: elastic/x-pack-elasticsearch@cefd362b70
This commit is contained in:
parent
e04f4e2395
commit
58c5f95402
|
@ -6,6 +6,10 @@
|
||||||
package org.elasticsearch.shield;
|
package org.elasticsearch.shield;
|
||||||
|
|
||||||
import org.elasticsearch.Version;
|
import org.elasticsearch.Version;
|
||||||
|
import org.elasticsearch.test.ElasticsearchTestCase;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.hamcrest.CoreMatchers.is;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is used to keep track of changes that we might have to make once we upgrade versions of dependencies, especially elasticsearch core.
|
* This class is used to keep track of changes that we might have to make once we upgrade versions of dependencies, especially elasticsearch core.
|
||||||
|
@ -16,12 +20,13 @@ import org.elasticsearch.Version;
|
||||||
* In many cases we will just have to bump the version of the assert then, unless we want to break backwards compatibility, but the idea is that this class
|
* In many cases we will just have to bump the version of the assert then, unless we want to break backwards compatibility, but the idea is that this class
|
||||||
* helps keeping track of this and eventually making changes when needed.
|
* helps keeping track of this and eventually making changes when needed.
|
||||||
*/
|
*/
|
||||||
public class VersionCompatibilityChecks {
|
public class VersionCompatibilityTests extends ElasticsearchTestCase {
|
||||||
|
|
||||||
static {
|
@Test
|
||||||
|
public void testCompatibility() {
|
||||||
//see https://github.com/elasticsearch/elasticsearch/pull/8634
|
//see https://github.com/elasticsearch/elasticsearch/pull/8634
|
||||||
assert Version.CURRENT.onOrBefore(Version.V_1_4_2) : "Remove ClusterDiscoveryConfiguration or bump the version, fixed in es core 1.5";
|
assertThat("Remove ClusterDiscoveryConfiguration or bump the version, fixed in es core 1.5", Version.CURRENT.onOrBefore(Version.V_1_4_2), is(true));
|
||||||
assert Version.CURRENT.onOrBefore(Version.V_1_4_2) : "Remove TransportProfileUtil class or bump the version, fixed in es core 1.5";
|
assertThat("Remove TransportProfileUtil class or bump the version, fixed in es core 1.5", Version.CURRENT.onOrBefore(Version.V_1_4_2), is(true));
|
||||||
assert Version.CURRENT.onOrBefore(Version.V_1_4_2) : "Cleanup SecuredMessageChannelHandler class and remove needless code, fixed in es core 1.5";
|
assertThat("Cleanup SecuredMessageChannelHandler class and remove needless code, fixed in es core 1.5", Version.CURRENT.onOrBefore(Version.V_1_4_2), is(true));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue