Skip to content

Commit f7980e9

Browse files
committed
Adapt version constants after backport (#47353)
1 parent 99d2fe2 commit f7980e9

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/bulk/10_basic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
---
6565
"Empty _id with op_type create":
6666
- skip:
67-
version: " - 7.99.99"
68-
reason: "auto id + op type create only supported since 8.0"
67+
version: " - 7.4.99"
68+
reason: "auto id + op type create only supported since 7.5"
6969

7070
- do:
7171
bulk:

rest-api-spec/src/main/resources/rest-api-spec/test/bulk/11_basic_with_types.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
---
6060
"Empty _id with op_type create":
6161
- skip:
62-
version: " - 7.99.99"
63-
reason: "auto id + op type create only supported since 8.0"
62+
version: " - 7.4.99"
63+
reason: "auto id + op type create only supported since 7.5"
6464

6565
- do:
6666
bulk:

server/src/main/java/org/elasticsearch/rest/action/document/RestIndexAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public String getName() {
109109
@Override
110110
public RestChannelConsumer prepareRequest(RestRequest request, final NodeClient client) throws IOException {
111111
assert request.params().get("id") == null : "non-null id: " + request.params().get("id");
112-
if (request.params().get("op_type") == null && clusterService.state().nodes().getMinNodeVersion().onOrAfter(Version.CURRENT)) {
112+
if (request.params().get("op_type") == null && clusterService.state().nodes().getMinNodeVersion().onOrAfter(Version.V_7_5_0)) {
113113
// default to op_type create
114114
request.params().put("op_type", "create");
115115
}

server/src/test/java/org/elasticsearch/rest/action/document/RestIndexActionTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public void testAutoIdDefaultsToOptypeCreate() {
104104

105105
public void testAutoIdDefaultsToOptypeIndexForOlderVersions() {
106106
checkAutoIdOpType(VersionUtils.randomVersionBetween(random(), null,
107-
VersionUtils.getPreviousVersion(Version.CURRENT)), DocWriteRequest.OpType.INDEX);
107+
VersionUtils.getPreviousVersion(Version.V_7_5_0)), DocWriteRequest.OpType.INDEX);
108108
}
109109

110110
private void checkAutoIdOpType(Version minClusterVersion, DocWriteRequest.OpType expectedOpType) {

0 commit comments

Comments
 (0)