use of io.confluent.ksql.rest.entity.ServerClusterId in project ksql by confluentinc.
the class RestApiTest method shouldExecuteServerMetadataIdRequest.
@Test
public void shouldExecuteServerMetadataIdRequest() {
// When:
final ServerClusterId response = RestIntegrationTestUtil.makeServerMetadataIdRequest(REST_APP);
// Then:
assertThat(response, is(notNullValue()));
}
use of io.confluent.ksql.rest.entity.ServerClusterId in project ksql by confluentinc.
the class RestIntegrationTestUtil method makeServerMetadataIdRequest.
static ServerClusterId makeServerMetadataIdRequest(final TestKsqlRestApp restApp) {
try (final KsqlRestClient restClient = restApp.buildKsqlClient(Optional.empty())) {
final RestResponse<ServerClusterId> res = restClient.getServerMetadataId();
throwOnError(res);
return res.getResponse();
}
}
use of io.confluent.ksql.rest.entity.ServerClusterId in project ksql by confluentinc.
the class TestEndpoints method executeServerMetadataClusterId.
@Override
public synchronized CompletableFuture<EndpointResponse> executeServerMetadataClusterId(ApiSecurityContext apiSecurityContext) {
this.lastApiSecurityContext = apiSecurityContext;
final ServerClusterId entity = ServerClusterId.of("kafka-cluster-id", "ksql-service-id");
return CompletableFuture.completedFuture(EndpointResponse.ok(entity));
}
use of io.confluent.ksql.rest.entity.ServerClusterId in project ksql by confluentinc.
the class ServerMetadataResourceTest method shouldReturnServerClusterId.
@Test
public void shouldReturnServerClusterId() {
// When:
final EndpointResponse response = serverMetadataResource.getServerClusterId();
// Then:
assertThat(response.getStatus(), equalTo(200));
assertThat(response.getEntity(), instanceOf(ServerClusterId.class));
final ServerClusterId serverClusterId = (ServerClusterId) response.getEntity();
assertThat(serverClusterId, equalTo(ServerClusterId.of(KAFKA_CLUSTER_ID, KSQL_SERVICE_ID)));
}
Aggregations