forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure Fleet REST yaml tests work in serverless (elastic#115869)
Use new gradle plugin for the yaml tests so they can be executed in serverless CI as well. Relates ES-8275
- Loading branch information
Showing
5 changed files
with
57 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,33 @@ | ||
apply plugin: 'elasticsearch.legacy-yaml-rest-test' | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
dependencies { | ||
yamlRestTestImplementation(testArtifact(project(xpackModule('core')))) | ||
} | ||
import org.elasticsearch.gradle.internal.info.BuildParams | ||
|
||
apply plugin: 'elasticsearch.internal-yaml-rest-test' | ||
apply plugin: 'elasticsearch.yaml-rest-compat-test' | ||
apply plugin: 'elasticsearch.internal-test-artifact' | ||
|
||
restResources { | ||
restApi { | ||
include '_common', 'bulk', 'cluster', 'nodes', 'indices', 'index', 'xpack', 'security', 'fleet' | ||
} | ||
} | ||
|
||
testClusters.configureEach { | ||
testDistribution = 'DEFAULT' | ||
setting 'xpack.security.enabled', 'true' | ||
setting 'xpack.license.self_generated.type', 'trial' | ||
extraConfigFile 'roles.yml', file('roles.yml') | ||
user username: 'elastic_admin', password: 'admin-password' | ||
user username: 'fleet_unprivileged_secrets', password: 'password', role: 'unprivileged_secrets' | ||
artifacts { | ||
restXpackTests(new File(projectDir, "src/yamlRestTest/resources/rest-api-spec/test")) | ||
} | ||
|
||
tasks.named('yamlRestTest') { | ||
usesDefaultDistribution() | ||
} | ||
tasks.named('yamlRestCompatTest') { | ||
usesDefaultDistribution() | ||
} | ||
if (BuildParams.inFipsJvm){ | ||
// This test cluster is using a BASIC license and FIPS 140 mode is not supported in BASIC | ||
tasks.named("yamlRestTest").configure{enabled = false } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.