Search in sources :

Example 6 with Settings

use of org.graylog.shaded.elasticsearch7.org.elasticsearch.common.settings.Settings in project elasticsearch by elastic.

the class AwsS3ServiceImplTests method testAWSCredentialsWithElasticsearchAwsAndS3SettingsBackcompat.

public void testAWSCredentialsWithElasticsearchAwsAndS3SettingsBackcompat() {
    Settings settings = Settings.builder().put(AwsS3Service.KEY_SETTING.getKey(), "aws_key").put(AwsS3Service.SECRET_SETTING.getKey(), "aws_secret").put(AwsS3Service.CLOUD_S3.KEY_SETTING.getKey(), "s3_key").put(AwsS3Service.CLOUD_S3.SECRET_SETTING.getKey(), "s3_secret").build();
    launchAWSCredentialsWithElasticsearchSettingsTest(Settings.EMPTY, settings, "s3_key", "s3_secret");
    assertSettingDeprecationsAndWarnings(new Setting<?>[] { AwsS3Service.KEY_SETTING, AwsS3Service.SECRET_SETTING, AwsS3Service.CLOUD_S3.KEY_SETTING, AwsS3Service.CLOUD_S3.SECRET_SETTING });
}
Also used : MockSecureSettings(org.elasticsearch.common.settings.MockSecureSettings) Settings(org.elasticsearch.common.settings.Settings)

Example 7 with Settings

use of org.graylog.shaded.elasticsearch7.org.elasticsearch.common.settings.Settings in project elasticsearch by elastic.

the class AwsS3ServiceImplTests method testGlobalMaxRetries.

public void testGlobalMaxRetries() {
    Settings settings = Settings.builder().put(S3Repository.Repositories.MAX_RETRIES_SETTING.getKey(), 10).build();
    launchAWSConfigurationTest(settings, Settings.EMPTY, Protocol.HTTPS, null, -1, null, null, null, 10, false, 50000);
}
Also used : MockSecureSettings(org.elasticsearch.common.settings.MockSecureSettings) Settings(org.elasticsearch.common.settings.Settings)

Example 8 with Settings

use of org.graylog.shaded.elasticsearch7.org.elasticsearch.common.settings.Settings in project elasticsearch by elastic.

the class AwsS3ServiceImplTests method testAWSCredentialsWithElasticsearchAwsAndRepositoriesSettingsAndRepositorySettingsBackcompat.

public void testAWSCredentialsWithElasticsearchAwsAndRepositoriesSettingsAndRepositorySettingsBackcompat() {
    Settings repositorySettings = generateRepositorySettings("repository_key", "repository_secret", null, null);
    Settings settings = Settings.builder().put(AwsS3Service.KEY_SETTING.getKey(), "aws_key").put(AwsS3Service.SECRET_SETTING.getKey(), "aws_secret").put(S3Repository.Repositories.KEY_SETTING.getKey(), "repositories_key").put(S3Repository.Repositories.SECRET_SETTING.getKey(), "repositories_secret").build();
    launchAWSCredentialsWithElasticsearchSettingsTest(repositorySettings, settings, "repository_key", "repository_secret");
    assertSettingDeprecationsAndWarnings(new Setting<?>[] { S3Repository.Repository.KEY_SETTING, S3Repository.Repository.SECRET_SETTING });
}
Also used : MockSecureSettings(org.elasticsearch.common.settings.MockSecureSettings) Settings(org.elasticsearch.common.settings.Settings)

Example 9 with Settings

use of org.graylog.shaded.elasticsearch7.org.elasticsearch.common.settings.Settings in project elasticsearch by elastic.

the class AwsS3ServiceImplTests method testAWSCredentialsWithElasticsearchAwsAndS3AndRepositoriesSettingsBackcompat.

public void testAWSCredentialsWithElasticsearchAwsAndS3AndRepositoriesSettingsBackcompat() {
    Settings settings = Settings.builder().put(AwsS3Service.KEY_SETTING.getKey(), "aws_key").put(AwsS3Service.SECRET_SETTING.getKey(), "aws_secret").put(AwsS3Service.CLOUD_S3.KEY_SETTING.getKey(), "s3_key").put(AwsS3Service.CLOUD_S3.SECRET_SETTING.getKey(), "s3_secret").put(S3Repository.Repositories.KEY_SETTING.getKey(), "repositories_key").put(S3Repository.Repositories.SECRET_SETTING.getKey(), "repositories_secret").build();
    launchAWSCredentialsWithElasticsearchSettingsTest(Settings.EMPTY, settings, "repositories_key", "repositories_secret");
    assertSettingDeprecationsAndWarnings(new Setting<?>[] { AwsS3Service.KEY_SETTING, AwsS3Service.SECRET_SETTING, AwsS3Service.CLOUD_S3.KEY_SETTING, AwsS3Service.CLOUD_S3.SECRET_SETTING, S3Repository.Repositories.KEY_SETTING, S3Repository.Repositories.SECRET_SETTING });
}
Also used : MockSecureSettings(org.elasticsearch.common.settings.MockSecureSettings) Settings(org.elasticsearch.common.settings.Settings)

Example 10 with Settings

use of org.graylog.shaded.elasticsearch7.org.elasticsearch.common.settings.Settings in project elasticsearch by elastic.

the class AwsS3ServiceImplTests method testAWSCredentialsWithElasticsearchAwsAndS3AndRepositoriesSettingsAndRepositorySettingsBackcompat.

public void testAWSCredentialsWithElasticsearchAwsAndS3AndRepositoriesSettingsAndRepositorySettingsBackcompat() {
    Settings repositorySettings = generateRepositorySettings("repository_key", "repository_secret", null, null);
    Settings settings = Settings.builder().put(AwsS3Service.KEY_SETTING.getKey(), "aws_key").put(AwsS3Service.SECRET_SETTING.getKey(), "aws_secret").put(AwsS3Service.CLOUD_S3.KEY_SETTING.getKey(), "s3_key").put(AwsS3Service.CLOUD_S3.SECRET_SETTING.getKey(), "s3_secret").put(S3Repository.Repositories.KEY_SETTING.getKey(), "repositories_key").put(S3Repository.Repositories.SECRET_SETTING.getKey(), "repositories_secret").build();
    launchAWSCredentialsWithElasticsearchSettingsTest(repositorySettings, settings, "repository_key", "repository_secret");
    assertSettingDeprecationsAndWarnings(new Setting<?>[] { S3Repository.Repository.KEY_SETTING, S3Repository.Repository.SECRET_SETTING });
}
Also used : MockSecureSettings(org.elasticsearch.common.settings.MockSecureSettings) Settings(org.elasticsearch.common.settings.Settings)

Aggregations

Settings (org.elasticsearch.common.settings.Settings)1248 Test (org.junit.Test)197 IndexSettings (org.elasticsearch.index.IndexSettings)167 IOException (java.io.IOException)133 Path (java.nio.file.Path)121 ClusterState (org.elasticsearch.cluster.ClusterState)120 ArrayList (java.util.ArrayList)108 ClusterSettings (org.elasticsearch.common.settings.ClusterSettings)106 HashMap (java.util.HashMap)105 DiscoveryNode (org.elasticsearch.cluster.node.DiscoveryNode)98 Version (org.elasticsearch.Version)91 Matchers.containsString (org.hamcrest.Matchers.containsString)91 Environment (org.elasticsearch.env.Environment)87 Map (java.util.Map)85 List (java.util.List)79 IndexMetaData (org.elasticsearch.cluster.metadata.IndexMetaData)72 Index (org.elasticsearch.index.Index)70 HashSet (java.util.HashSet)58 IndexMetadata (org.elasticsearch.cluster.metadata.IndexMetadata)54 ThreadPool (org.elasticsearch.threadpool.ThreadPool)54