Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:third-party:jira");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:third-party:pagerduty");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:third-party:slack");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:async-search:qa:rest");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:autoscaling:qa:rest");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:deprecation:qa:early-deprecation-rest");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:deprecation:qa:rest");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:downsample:qa:with-security");
Expand Down
23 changes: 15 additions & 8 deletions x-pack/plugin/autoscaling/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apply plugin: 'elasticsearch.internal-es-plugin'
apply plugin: 'elasticsearch.internal-cluster-test'
apply plugin: 'elasticsearch.internal-yaml-rest-test'

esplugin {
name = 'x-pack-autoscaling'
Expand All @@ -15,15 +16,21 @@ base {

dependencies {
compileOnly project(path: xpackModule('core'))
testImplementation(testArtifact(project(xpackModule('core'))))
testImplementation project(':modules:data-streams')
testImplementation project(path: xpackModule('blob-cache'))
testImplementation project(path: xpackModule('searchable-snapshots'))
testImplementation project(path: xpackModule('ilm'))
testImplementation project(path: xpackModule('slm'))
testImplementation project(path: xpackModule('ccr'))

testImplementation testArtifact(project(':server'))
testImplementation testArtifact(project(xpackModule('core')))
testImplementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"

internalClusterTestImplementation project(':modules:data-streams')
internalClusterTestImplementation project(xpackModule('blob-cache'))
internalClusterTestImplementation project(xpackModule("searchable-snapshots"))
internalClusterTestImplementation project(xpackModule('ilm'))
internalClusterTestImplementation project(xpackModule('slm'))
internalClusterTestImplementation project(xpackModule('ccr'))
}

addQaCheckDependencies(project)
restResources {
restApi {
include '_common', 'autoscaling'
}
}
Empty file.
28 changes: 0 additions & 28 deletions x-pack/plugin/autoscaling/qa/rest/build.gradle

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,24 @@
import org.elasticsearch.common.settings.SecureString;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.util.resource.Resource;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;

import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue;
import org.junit.ClassRule;

public class AutoscalingRestIT extends ESClientYamlSuiteTestCase {

@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.module("x-pack-autoscaling")
.setting("xpack.security.enabled", "true")
.setting("xpack.license.self_generated.type", "trial")
.rolesFile(Resource.fromClasspath("autoscaling-roles.yml"))
.user("autoscaling-admin", "autoscaling-admin-password", "superuser", false)
.user("autoscaling-user", "autoscaling-user-password", "autoscaling", false)
.build();

public AutoscalingRestIT(final ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}
Expand All @@ -40,4 +51,8 @@ protected Settings restClientSettings() {
return Settings.builder().put(ThreadContext.PREFIX + ".Authorization", value).build();
}

@Override
protected String getTestRestCluster() {
return cluster.getHttpAddresses();
}
}