use of org.graylog.testing.containermatrix.annotations.ContainerMatrixTest in project graylog2-server by Graylog2.
the class SearchMetadataIT method testRetrievingMetadataForStoredSearchWithParameter.
@ContainerMatrixTest
void testRetrievingMetadataForStoredSearchWithParameter() {
final ValidatableResponse response = given().spec(requestSpec).when().get("/views/search/metadata/61977043c1f17d26b45c8a0a").then().statusCode(200);
response.assertThat().body("query_metadata.f1446410-a082-4871-b3bf-d69aa42d0c96.used_parameters_names", contains("action"));
response.assertThat().body("declared_parameters", anEmptyMap());
}
use of org.graylog.testing.containermatrix.annotations.ContainerMatrixTest in project graylog2-server by Graylog2.
the class SuggestionResourceIT method testSizeOtherDocsCount.
@ContainerMatrixTest
void testSizeOtherDocsCount() {
final ValidatableResponse validatableResponse = given().spec(requestSpec).when().body("{\"field\":\"facility\", \"input\":\"\", \"size\":1}").post("/search/suggest").then().statusCode(200);
validatableResponse.assertThat().body("suggestions.value[0]", equalTo("test"));
validatableResponse.assertThat().body("suggestions.occurrence[0]", greaterThanOrEqualTo(2));
validatableResponse.assertThat().body("sum_other_docs_count", greaterThanOrEqualTo(1));
}
use of org.graylog.testing.containermatrix.annotations.ContainerMatrixTest in project graylog2-server by Graylog2.
the class SuggestionResourceIT method testMinimalRequest.
@ContainerMatrixTest
void testMinimalRequest() {
final ValidatableResponse validatableResponse = given().spec(requestSpec).when().body("{\"field\":\"facility\", \"input\":\"\"}").post("/search/suggest").then().statusCode(200);
validatableResponse.assertThat().body("suggestions.value[0]", equalTo("test"));
validatableResponse.assertThat().body("suggestions.occurrence[0]", greaterThanOrEqualTo(2));
}
use of org.graylog.testing.containermatrix.annotations.ContainerMatrixTest in project graylog2-server by Graylog2.
the class QueryValidationResourceIT method testMinimalisticRequest.
@ContainerMatrixTest
void testMinimalisticRequest() {
final ValidatableResponse validatableResponse = given().spec(requestSpec).when().body("{\"query\":\"foo:bar\"}").post("/search/validate").then().statusCode(200);
validatableResponse.assertThat().body("status", equalTo("WARNING"));
}
use of org.graylog.testing.containermatrix.annotations.ContainerMatrixTest in project graylog2-server by Graylog2.
the class QueryValidationResourceIT method testRegexWithoutFieldName.
@ContainerMatrixTest
void testRegexWithoutFieldName() {
final ValidatableResponse validatableResponse = given().spec(requestSpec).when().body("{\"query\":\"/ethernet[0-9]+/\"}").post("/search/validate").then().statusCode(200);
validatableResponse.assertThat().body("status", equalTo("OK"));
}
Aggregations