public RestoreApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { if (!TestClient.Configuration.RunIntegrationTests) { return; } var createRepository = this.Client.CreateRepository(RepositoryName, r => r .FileSystem(fs => fs .Settings(Path.Combine(cluster.Node.RepositoryPath, RepositoryName)) ) ); if (!createRepository.IsValid) { throw new Exception("Setup: failed to create snapshot repository"); } var getSnapshotResponse = this.Client.GetSnapshot(RepositoryName, SnapshotName); if ((!getSnapshotResponse.IsValid && getSnapshotResponse.ApiCall.HttpStatusCode == 404) || !getSnapshotResponse.Snapshots.Any()) { var snapshot = this.Client.Snapshot(RepositoryName, SnapshotName, s => s .WaitForCompletion() ); if (!snapshot.IsValid) { throw new Exception($"Setup: snapshot failed. {snapshot.OriginalException}. {snapshot.ServerError?.Error}"); } } }
public RestoreApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { _repositoryName = RandomString(); _snapshotName = RandomString(); if (!TestClient.RunIntegrationTests) { return; } var createRepository = this.Client.CreateRepository(_repositoryName, r => r .FileSystem(fs => fs .Settings(Path.Combine(cluster.Node.RepositoryPath, _repositoryName)) ) ); if (!createRepository.IsValid) { throw new Exception("Setup: failed to create snapshot repository"); } var snapshot = this.Client.Snapshot(_repositoryName, _snapshotName, s => s .WaitForCompletion() ); if (!snapshot.IsValid) { throw new Exception("Setup: snapshot failed"); } }
public SnapshotCrudTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { _repositoryLocation = Path.Combine(cluster.Node.RepositoryPath, RandomString()); var create = this.Client.CreateRepository(_repositoryName, cr => cr .FileSystem(fs => fs .Settings(_repositoryLocation) ) ); if (!create.IsValid || !create.Acknowledged) { throw new Exception("Setup: failed to create snapshot repository"); } }
public IndexAnonymousTypesIntegrationTests(IndexingCluster cluster) : base(cluster) { }
public TermVectorsApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public ScriptingCrudTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public IndexIngestApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public ExceptionTests(IndexingCluster cluster, EndpointUsage usage) { _port = cluster.Node.Port; }
public PropertyNames(IndexingCluster cluster) : base(cluster) { _client = cluster.Client(); }
public DeleteAllIndicesApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public GithubIssue2173(IndexingCluster cluster) { _cluster = cluster; }
public PropertyNames(IndexingCluster cluster) : base(cluster) { _client = cluster.Node.Client(); }
public CatRepositoriesApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public PercolateQueryUsageTests(IndexingCluster i, EndpointUsage usage) : base(i, usage) { }
public PipelineCrudTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public BulkInvalidApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public IndexIntegrationTests(IndexingCluster cluster) : base(cluster) { }
public GetIndexTemplateApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public AnalysisCrudTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public PutMappingApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public UnregisterPercolatorApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public PropertyNames(IndexingCluster cluster) : base(cluster) { }
public DocumentExistsApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public CatSnapshotsApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public UpdateIndexSettingsApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public RepositoryCrudTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { _rootRepositoryPath = cluster.Node.RepositoryPath; }
public AliasApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public PercolateApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public UpdateWithSourceApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public SearchTemplateCrudTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
public CreateIndexApiTests(IndexingCluster cluster, EndpointUsage usage) : base(cluster, usage) { }