[BUG] Fix cat.health test failures in pre 1.0.0 mixed cluster test (#928)

Fixes the cat.health yaml failures when running in a bwc mixed cluster with
legacy (pre 1.0.0) nodes.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
This commit is contained in:
Nick Knize 2021-07-02 18:01:58 -04:00 committed by Nicholas Walter Knize
parent 25bbdb7219
commit 2d1a1e6234
No known key found for this signature in database
GPG Key ID: 51F0CC22F625308A
2 changed files with 11 additions and 3 deletions

View File

@ -1,5 +1,8 @@
---
"Help":
- skip:
version: " - 7.10.99"
reason: "discovered_master added in OpenSearch 1.0.0"
- do:
cat.health:
help: true
@ -27,7 +30,9 @@
---
"Empty cluster":
- skip:
version: " - 7.10.99"
reason: "discovered_master added in OpenSearch 1.0.0"
- do:
cat.health: {}
@ -56,7 +61,9 @@
---
"With ts parameter":
- skip:
version: " - 7.10.99"
reason: "discovered_master added in OpenSearch 1.0.0"
- do:
cat.health:
ts: false

View File

@ -2013,7 +2013,8 @@ public abstract class AbstractSimpleTransportTestCase extends OpenSearchTestCase
TransportRequestOptions.Type.REG,
TransportRequestOptions.Type.STATE);
try (Transport.Connection connection = serviceA.openConnection(node, builder.build())) {
assertEquals(connection.getVersion(), version);
// OpenSearch 1.0+ in bwc mode should only "upgrade" to Legacy v7.10.2
assertEquals(connection.getVersion(), version.onOrAfter(Version.V_1_0_0) ? LegacyESVersion.V_7_10_2 : version);
}
}
}