Browse Source

[ML] Unmute BWC tests and fix version after backport of #50553 (#50599)

Relates #50553
Dimitris Athanasiou 5 years ago
parent
commit
0dc4b31460

+ 2 - 2
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteDataFrameAnalyticsAction.java

@@ -40,7 +40,7 @@ public class DeleteDataFrameAnalyticsAction extends ActionType<AcknowledgedRespo
         public Request(StreamInput in) throws IOException {
             super(in);
             id = in.readString();
-            if (in.getVersion().onOrAfter(Version.CURRENT)) {
+            if (in.getVersion().onOrAfter(Version.V_7_6_0)) {
                 force = in.readBoolean();
             } else {
                 force = false;
@@ -82,7 +82,7 @@ public class DeleteDataFrameAnalyticsAction extends ActionType<AcknowledgedRespo
         public void writeTo(StreamOutput out) throws IOException {
             super.writeTo(out);
             out.writeString(id);
-            if (out.getVersion().onOrAfter(Version.CURRENT)) {
+            if (out.getVersion().onOrAfter(Version.V_7_6_0)) {
                 out.writeBoolean(force);
             }
         }

+ 23 - 5
x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/90_ml_data_frame_analytics_crud.yml

@@ -1,8 +1,3 @@
-setup:
-  - skip:
-      version: "all"
-      reason:  "Until backport of https://github.com/elastic/elasticsearch/issues/50553"
-
 ---
 "Get old outlier_detection job":
 
@@ -148,3 +143,26 @@ setup:
   - match: { count: 1 }
   - match: { data_frame_analytics.0.id: "mixed_cluster_outlier_detection_job" }
   - match: { data_frame_analytics.0.state: "stopped" }
+
+---
+"Put and delete a job":
+
+  - do:
+      ml.put_data_frame_analytics:
+        id: "mixed_cluster_job_to_delete"
+        body: >
+          {
+            "source": {
+              "index": "bwc_ml_outlier_detection_job_source"
+            },
+            "dest": {
+              "index": "mixed_cluster_job_to_delete_results"
+            },
+            "analysis": {"outlier_detection":{}}
+          }
+  - match: { id: "mixed_cluster_job_to_delete" }
+
+  - do:
+      ml.delete_data_frame_analytics:
+        id: mixed_cluster_job_to_delete
+  - match: { acknowledged: true }

+ 0 - 3
x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/90_ml_data_frame_analytics_crud.yml

@@ -1,7 +1,4 @@
 setup:
-  - skip:
-      version: "all"
-      reason:  "Until backport of https://github.com/elastic/elasticsearch/issues/50553"
 
   - do:
       index:

+ 0 - 5
x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/90_ml_data_frame_analytics_crud.yml

@@ -1,8 +1,3 @@
-setup:
-  - skip:
-      version: "all"
-      reason:  "Until backport of https://github.com/elastic/elasticsearch/issues/50553"
-
 ---
 "Get old cluster outlier_detection job":