use of io.crate.analyze.repositories.TypeSettings in project crate by crate.
the class S3RepositoryPluginAnalyzerTest method prepare.
@Before
public void prepare() {
RepositoriesMetadata repositoriesMetadata = new RepositoriesMetadata(Collections.singletonList(new RepositoryMetadata("my_repo", "fs", Settings.builder().put("location", "/tmp/my_repo").build())));
ClusterState clusterState = ClusterState.builder(new ClusterName("testing")).metadata(Metadata.builder().putCustom(RepositoriesMetadata.TYPE, repositoriesMetadata)).build();
ClusterServiceUtils.setState(clusterService, clusterState);
e = SQLExecutor.builder(clusterService).build();
plannerContext = e.getPlannerContext(clusterService.state());
repositoryParamValidator = new RepositoryParamValidator(Map.of("s3", new TypeSettings(List.of(), S3Repository.optionalSettings())));
}
use of io.crate.analyze.repositories.TypeSettings in project crate by crate.
the class AzureRepositoryAnalyzerTest method prepare.
@Before
public void prepare() {
RepositoriesMetadata repositoriesMetadata = new RepositoriesMetadata(Collections.singletonList(new RepositoryMetadata("my_repo", "fs", Settings.builder().put("location", "/tmp/my_repo").build())));
ClusterState clusterState = ClusterState.builder(new ClusterName("testing")).metadata(Metadata.builder().putCustom(RepositoriesMetadata.TYPE, repositoriesMetadata)).build();
ClusterServiceUtils.setState(clusterService, clusterState);
e = SQLExecutor.builder(clusterService).build();
plannerContext = e.getPlannerContext(clusterService.state());
repositoryParamValidator = new RepositoryParamValidator(Map.of("azure", new TypeSettings(AzureRepository.mandatorySettings(), AzureRepository.optionalSettings())));
}
use of io.crate.analyze.repositories.TypeSettings in project crate by crate.
the class CreateDropRepositoryAnalyzerTest method prepare.
@Before
public void prepare() {
RepositoriesMetadata repositoriesMetadata = new RepositoriesMetadata(Collections.singletonList(new RepositoryMetadata("my_repo", "fs", Settings.builder().put("location", "/tmp/my_repo").build())));
ClusterState clusterState = ClusterState.builder(new ClusterName("testing")).metadata(Metadata.builder().putCustom(RepositoriesMetadata.TYPE, repositoriesMetadata)).build();
ClusterServiceUtils.setState(clusterService, clusterState);
e = SQLExecutor.builder(clusterService).build();
plannerContext = e.getPlannerContext(clusterService.state());
repositoryParamValidator = new RepositoryParamValidator(Map.of("fs", new TypeSettings(FsRepository.mandatorySettings(), FsRepository.optionalSettings())));
}
Aggregations