protected ClusterBase() { var name = this.GetType().Name.Replace("Cluster", ""); var nodeConfig = new NodeConfiguration(TestClient.Configuration) { TypeOfCluster = name, RequiredPlugins = RequiredPlugins(this.GetType()) }; this.Node = new ElasticsearchNode(nodeConfig, new TestRunnerFileSystem(nodeConfig)); this.Node.BootstrapWork.Subscribe(handle => { this.Bootstrap(); handle.Set(); }); }
public TestRunnerFileSystem(NodeConfiguration config) { this._config = config; this._name = config.TypeOfCluster; var prefix = this._name.ToLowerInvariant(); var suffix = Guid.NewGuid().ToString("N").Substring(0, 6); this.ClusterName = $"{prefix}-cluster-{suffix}"; this.NodeName = $"{prefix}-node-{suffix}"; var appData = GetApplicationDataDirectory(); this.RoamingFolder = Path.Combine(appData, "NEST", this.Version.FullyQualifiedVersion); this.ElasticsearchHome = Path.Combine(this.RoamingFolder, this.Version.FolderInZip); if (config.RunIntegrationTests) this.DownloadAndExtractElasticsearch(); }