소스 검색

Update Rollup's QA/rest to use yaml-rest-test plugin in build (#67303)

This commit updates the Rollup qa directory to leverage the
updated convention of running yaml tests. This also fixes a bug
wherein the qa tests were not running on `rollup:check`.
Tal Levy 4 년 전
부모
커밋
668488e3e1

+ 0 - 15
x-pack/plugin/rollup/qa/build.gradle

@@ -1,15 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License;
- * you may not use this file except in compliance with the Elastic License.
- */
-
-import org.elasticsearch.gradle.test.RestIntegTestTask
-
-apply plugin: 'elasticsearch.build'
-
-tasks.named("test").configure { enabled = false }
-
-dependencies {
-  api project(':test:framework')
-}

+ 16 - 17
x-pack/plugin/rollup/qa/rest/build.gradle

@@ -3,32 +3,31 @@
  * or more contributor license agreements. Licensed under the Elastic License;
  * you may not use this file except in compliance with the Elastic License.
  */
+import org.elasticsearch.gradle.info.BuildParams
 
-apply plugin: 'elasticsearch.testclusters'
-apply plugin: 'elasticsearch.standalone-rest-test'
-apply plugin: 'elasticsearch.rest-test'
-apply plugin: 'elasticsearch.rest-resources'
+apply plugin: 'elasticsearch.yaml-rest-test'
 
-import org.elasticsearch.gradle.info.BuildParams
 
 dependencies {
-    testImplementation project(path: xpackModule('rollup'))
+  yamlRestTestImplementation project(path: xpackModule('rollup'))
 }
 
 restResources {
-    restApi {
-        includeCore '_common', 'bulk', 'cluster', 'indices', 'search'
-        includeXpack 'rollup'
-    }
+  restApi {
+    includeCore '_common', 'bulk', 'cluster', 'indices', 'search'
+    includeXpack 'rollup'
+  }
+}
+
+testClusters.all {
+  testDistribution = 'DEFAULT'
+  setting 'xpack.license.self_generated.type', 'basic'
+  systemProperty 'es.rollup_v2_feature_flag_enabled', 'true'
 }
 
+tasks.named("test").configure{enabled = false }
+
 if (BuildParams.inFipsJvm){
   // This test cluster is using a BASIC license and FIPS 140 mode is not supported in BASIC
-  tasks.named("integTest").configure{enabled = false }
-  tasks.named("testingConventions").configure{enabled = false }
-}
-testClusters.matching { it.name == "integTest" }.configureEach {
-    testDistribution = 'DEFAULT'
-    setting 'xpack.license.self_generated.type', 'basic'
-    systemProperty 'es.rollup_v2_feature_flag_enabled', 'true'
+  tasks.named("yamlRestTest").configure{enabled = false }
 }

+ 0 - 0
x-pack/plugin/rollup/qa/rest/src/test/java/org/elasticsearch/xpack/rollup/v2/RollupRestIT.java → x-pack/plugin/rollup/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/rollup/v2/RollupRestIT.java


+ 0 - 0
x-pack/plugin/rollup/qa/rest/src/test/resources/rest-api-spec/test/rollup/10_basic.yml → x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/10_basic.yml