public ClientTestClusterConfiguration(ClusterFeatures features = ClusterFeatures.None, int numberOfNodes = 1,
                                              params ElasticsearchPlugin[] plugins
                                              )
            : base(TestClient.Configuration.ElasticsearchVersion, features, new ElasticsearchPlugins(plugins), numberOfNodes)
        {
            TestConfiguration = TestClient.Configuration;
            ShowElasticsearchOutputAfterStarted = TestConfiguration.ShowElasticsearchOutputAfterStarted;
            HttpFiddlerAware = true;

            CacheEsHomeInstallation = true;

            Add(AttributeKey("testingcluster"), "true");
            Add(AttributeKey("gateway"), "true");
            Add("search.remote.connect", "true");

            Add($"script.max_compilations_per_minute", "10000", "<6.0.0-rc1");
            Add($"script.max_compilations_rate", "10000/1m", ">=6.0.0-rc1");

            Add($"script.inline", "true", "<5.5.0");
            Add($"script.stored", "true", ">5.0.0-alpha1 <5.5.0");
            Add($"script.indexed", "true", "<5.0.0-alpha1");
            Add($"script.allowed_types", "inline,stored", ">=5.5.0");

            AdditionalBeforeNodeStartedTasks.Add(new WriteAnalysisFiles());
        }
Beispiel #2
0
        public ClientTestClusterConfiguration(ClusterFeatures features = ClusterFeatures.None, int numberOfNodes = 1,
                                              params ElasticsearchPlugin[] plugins
                                              )
            : base(TestClient.Configuration.ElasticsearchVersion, features, new ElasticsearchPlugins(plugins),
                   numberOfNodes)
        {
            TestConfiguration = TestClient.Configuration;
            ShowElasticsearchOutputAfterStarted = TestConfiguration.ShowElasticsearchOutputAfterStarted;
            HttpFiddlerAware = true;

            CacheEsHomeInstallation = true;

            Add(AttributeKey("testingcluster"), "true");
            Add(AttributeKey("gateway"), "true");
            Add("search.remote.connect", "true", "<8.0.0");
            //Add("node.remote_cluster_client", "true", ">=8.0.0-SNAPSHOT");

            //Add("cluster.routing.allocation.disk.watermark.high", "95%");
            Add($"script.max_compilations_per_minute", "10000", "<6.0.0-rc1");
            Add($"script.max_compilations_rate", "10000/1m", ">=6.0.0-rc1 <7.9.0-SNAPSHOT");
            Add($"script.disable_max_compilations_rate", "true", ">=7.9.0-SNAPSHOT");

            Add($"ingest.geoip.downloader.enabled", "false");
            Add($"script.inline", "true", "<5.5.0");
            Add($"script.stored", "true", ">5.0.0-alpha1 <5.5.0");
            Add($"script.indexed", "true", "<5.0.0-alpha1");
            Add($"script.allowed_types", "inline,stored", ">=5.5.0");

            Add($"xpack.security.http.ssl.enabled", "false", ">=7.99.99");

            AdditionalBeforeNodeStartedTasks.Add(new WriteAnalysisFiles());
        }
 public XunitClusterConfiguration(
     ElasticsearchVersion version,
     ClusterFeatures features     = ClusterFeatures.None,
     ElasticsearchPlugins plugins = null,
     int numberOfNodes            = 1)
     : base(version, features, plugins, numberOfNodes)
 {
     this.AdditionalAfterStartedTasks.Add(new PrintXunitAfterStartedTask());
 }
Beispiel #4
0
        public XPackClusterConfiguration(ClusterFeatures features) : base(ClusterFeatures.XPack | features, 1)
        {
            // Get license file path from environment variable
            var licenseFilePath = Environment.GetEnvironmentVariable("ES_LICENSE_FILE");

            if (!string.IsNullOrEmpty(licenseFilePath) && File.Exists(licenseFilePath))
            {
                var licenseContents = File.ReadAllText(licenseFilePath);
                this.XPackLicenseJson = licenseContents;
            }
            this.AdditionalBeforeNodeStartedTasks.Add(new EnsureWatcherActionConfigurationInElasticsearchYaml());
        }
Beispiel #5
0
        public XPackClusterConfiguration(ClusterFeatures features) : base(ClusterFeatures.XPack | features, 1, ElasticsearchPlugin.IngestAttachment)
        {
            // Get license file path from environment variable
            var licenseFilePath = Environment.GetEnvironmentVariable("ES_LICENSE_FILE");

            if (!string.IsNullOrEmpty(licenseFilePath) && File.Exists(licenseFilePath))
            {
                var licenseContents = File.ReadAllText(licenseFilePath);
                XPackLicenseJson = licenseContents;
            }
            TrialMode = XPackTrialMode.Trial;
            AdditionalBeforeNodeStartedTasks.Add(new EnsureWatcherActionConfigurationInElasticsearchYaml());
            AdditionalBeforeNodeStartedTasks.Add(new EnsureWatcherActionConfigurationSecretsInKeystore());
            AdditionalBeforeNodeStartedTasks.Add(new EnsureNativeSecurityRealmEnabledInElasticsearchYaml());
            ShowElasticsearchOutputAfterStarted = true;             //this.TestConfiguration.ShowElasticsearchOutputAfterStarted;
        }
        public EphemeralClusterConfiguration(ElasticsearchVersion version, ClusterFeatures features = ClusterFeatures.None, ElasticsearchPlugins plugins = null, int numberOfNodes = 1)
            : base(version, (v, s) => new EphemeralFileSystem(v, s), numberOfNodes, EphemeralClusterName)
        {
            this.Features = features;

            var pluginsList = plugins?.ToList() ?? new List <ElasticsearchPlugin>();

            if (this.Features.HasFlag(ClusterFeatures.XPack) && !pluginsList.Any(p => p.Moniker == "x-pack"))
            {
                pluginsList.Add(ElasticsearchPlugin.XPack);
            }

            this.Plugins = new ElasticsearchPlugins(pluginsList);

            AddDefaultXPackSettings();
        }
        public EphemeralClusterConfiguration(ElasticVersion version, ClusterFeatures features,
                                             ElasticsearchPlugins plugins = null, int numberOfNodes = 1)
            : base(version, (v, s) => new EphemeralFileSystem(v, s), numberOfNodes, EphemeralClusterName)
        {
            TrialMode = XPackTrialMode.None;
            Features  = features;

            var pluginsList = plugins?.ToList() ?? new List <ElasticsearchPlugin>();

            if (Features.HasFlag(ClusterFeatures.XPack) && pluginsList.All(p => p.SubProductName != "x-pack"))
            {
                pluginsList.Add(ElasticsearchPlugin.XPack);
            }

            Plugins = new ElasticsearchPlugins(pluginsList);

            AddDefaultXPackSettings();
        }
        public ClientTestClusterConfiguration(
            string elasticsearchVersion,
            ClusterFeatures features = ClusterFeatures.None,
            int numberOfNodes        = 1,
            params ElasticsearchPlugin[] plugins
            )
            : base(elasticsearchVersion, features, new ElasticsearchPlugins(plugins), numberOfNodes)
        {
            HttpFiddlerAware        = true;
            CacheEsHomeInstallation = true;

            Add(AttributeKey("testingcluster"), "true");

            Add($"script.max_compilations_per_minute", "10000", "<6.0.0-rc1");
            Add($"script.max_compilations_rate", "10000/1m", ">=6.0.0-rc1");

            Add($"script.inline", "true", "<5.5.0");
            Add($"script.stored", "true", ">5.0.0-alpha1 <5.5.0");
            Add($"script.indexed", "true", "<5.0.0-alpha1");
            Add($"script.allowed_types", "inline,stored", ">=5.5.0");
        }
Beispiel #9
0
        public XPackClusterConfiguration(ClusterFeatures features) : base(ClusterFeatures.XPack | features, 1)
        {
            this.ShowElasticsearchOutputAfterStarted = false;

            this.AdditionalBeforeNodeStartedTasks.Add(new EnsureWatcherActionConfigurationInElasticsearchYaml());
        }
Beispiel #10
0
 public XunitClusterConfiguration(
     ElasticVersion version,
     ClusterFeatures features     = ClusterFeatures.None,
     ElasticsearchPlugins plugins = null,
     int numberOfNodes            = 1)
     : base(version, features, plugins, numberOfNodes) =>