-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Convert CCR module tests to new testing framework #125894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mark-vieira
merged 8 commits into
elastic:main
from
mark-vieira:convert-ccr-module-tests
Mar 31, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1ff6cb4
Convert CCR module tests to new testing framework
mark-vieira 148131e
Merge branch 'main' into convert-ccr-module-tests
mark-vieira 1b22160
Remove CCR modules
mark-vieira aa86422
ILM needs this
mark-vieira b39a72f
[CI] Auto commit changes from spotless
d142f44
Merge branch 'main' into convert-ccr-module-tests
mark-vieira c0a0f43
Don't test on fips
mark-vieira 25557a9
Merge branch 'main' into convert-ccr-module-tests
mark-vieira File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,46 +1,68 @@ | ||
| import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask | ||
|
|
||
| apply plugin: 'elasticsearch.internal-es-plugin' | ||
| apply plugin: 'elasticsearch.internal-cluster-test' | ||
| apply plugin: 'elasticsearch.internal-java-rest-test' | ||
| apply plugin: 'elasticsearch.internal-yaml-rest-test' | ||
| apply plugin: 'elasticsearch.internal-test-artifact' | ||
|
|
||
| esplugin { | ||
| name = 'x-pack-ccr' | ||
| description = 'Elasticsearch Expanded Pack Plugin - CCR' | ||
| classname ='org.elasticsearch.xpack.ccr.Ccr' | ||
| hasNativeController =false | ||
| requiresKeystore =true | ||
| classname = 'org.elasticsearch.xpack.ccr.Ccr' | ||
| hasNativeController = false | ||
| requiresKeystore = true | ||
| extendedPlugins = ['x-pack-core'] | ||
| } | ||
|
|
||
| base { | ||
| archivesName = 'x-pack-ccr' | ||
| } | ||
|
|
||
| // Integration Test classes that cannot run with the security manager | ||
| String[] noSecurityManagerITClasses = ["**/CloseFollowerIndexIT.class"] | ||
| dependencies { | ||
| compileOnly project(":server") | ||
|
|
||
| tasks.register('internalClusterTestNoSecurityManager', Test) { | ||
| testClassesDirs = sourceSets.internalClusterTest.output.classesDirs | ||
| classpath = sourceSets.internalClusterTest.runtimeClasspath | ||
| include noSecurityManagerITClasses | ||
| systemProperty 'tests.security.manager', 'false' | ||
| compileOnly project(path: xpackModule('core')) | ||
| testImplementation(testArtifact(project(xpackModule('core')))) | ||
| testImplementation(testArtifact(project(xpackModule('monitoring')))) | ||
| testImplementation(project(":modules:analysis-common")) | ||
| testImplementation(project(":modules:data-streams")) | ||
| javaRestTestImplementation(testImplementation(testArtifact(project(xpackModule('core'))))) | ||
|
|
||
| clusterModules project(":modules:analysis-common") | ||
| clusterModules project(":modules:mapper-extras") | ||
| clusterModules project(":modules:data-streams") | ||
| clusterModules project(":modules:ingest-common") | ||
| clusterModules project(xpackModule("monitoring")) | ||
| clusterModules project(xpackModule("ilm")) | ||
| clusterModules project(xpackModule("wildcard")) | ||
| clusterModules project(xpackModule("stack")) | ||
| clusterModules project(xpackModule("mapper-constant-keyword")) | ||
| clusterModules project(xpackModule("searchable-snapshots")) | ||
| } | ||
| tasks.named("check").configure { dependsOn 'internalClusterTestNoSecurityManager' } | ||
|
|
||
| tasks.named('internalClusterTest').configure { | ||
| exclude noSecurityManagerITClasses | ||
| restResources { | ||
| restApi { | ||
| include '_common', 'cluster', 'nodes', 'indices', 'index', 'info', 'ccr' | ||
| } | ||
| } | ||
|
|
||
| tasks.named('internalClusterTestTestingConventions').configure { | ||
| tasks.named('internalClusterTest') { | ||
| systemProperty 'tests.security.manager', 'false' | ||
| } | ||
|
|
||
| tasks.named('internalClusterTestTestingConventions') { | ||
| baseClass 'org.elasticsearch.xpack.CcrIntegTestCase' | ||
| baseClass 'org.elasticsearch.xpack.CcrSingleNodeTestCase' | ||
| baseClass 'org.elasticsearch.test.ESIntegTestCase' | ||
| } | ||
|
|
||
| addQaCheckDependencies(project) | ||
|
|
||
| dependencies { | ||
| compileOnly project(":server") | ||
| tasks.named("yamlRestTest") { | ||
| usesDefaultDistribution("uses _xpack info api") | ||
| } | ||
|
|
||
| compileOnly project(path: xpackModule('core')) | ||
| testImplementation(testArtifact(project(xpackModule('core')))) | ||
| testImplementation(testArtifact(project(xpackModule('monitoring')))) | ||
| testImplementation(project(":modules:analysis-common")) | ||
| testImplementation(project(":modules:data-streams")) | ||
| tasks.withType(StandaloneRestIntegTestTask).configureEach { | ||
| // These fail in CI but only when run as part of checkPart2 and not individually. | ||
| // Tracked in : https://github.com/elastic/elasticsearch/issues/66661 | ||
| buildParams.withFipsEnabledOnly(it) | ||
| } | ||
This file contains hidden or 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 +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 | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| apply plugin: 'elasticsearch.java' | ||
|
|
||
| dependencies { | ||
| api project(':test:framework') | ||
| } | ||
|
|
||
| subprojects { | ||
| tasks.withType(Test).configureEach { | ||
| // These fail in CI but only when run as part of checkPart2 and not individually. | ||
| // Tracked in : https://github.com/elastic/elasticsearch/issues/66661 | ||
| buildParams.withFipsEnabledOnly(it) | ||
| } | ||
| } | ||
85 changes: 0 additions & 85 deletions
85
x-pack/plugin/ccr/qa/downgrade-to-basic-license/build.gradle
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security manager isn't a thing anymore so we don't need this extra task.