Search in sources :

Example 31 with Issue

use of io.qameta.allure.Issue in project atsd-api-test by axibase.

the class MetricGetTest method testMetricNameContainsCyrillic.

@Issue("1278")
@Test
public void testMetricNameContainsCyrillic() throws Exception {
    final Metric metric = new Metric("getйёmetric-3");
    createOrReplaceMetricCheck(metric);
    Response response = queryMetric(metric.getName());
    assertEquals("Fail to execute queryMetric query", OK.getStatusCode(), response.getStatus());
    assertTrue("Metrics should be equal", compareJsonString(jacksonMapper.writeValueAsString(metric), response.readEntity(String.class)));
}
Also used : Response(javax.ws.rs.core.Response) Metric(com.axibase.tsd.api.model.metric.Metric) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 32 with Issue

use of io.qameta.allure.Issue in project atsd-api-test by axibase.

the class MetricSeriesTagsTest method testMetricSeriesTagsTagNameAndTagsParams.

@Issue("4715")
@Test(description = "Test {metric}/series/tags with tags and tags.name wildcard parameters")
public void testMetricSeriesTagsTagNameAndTagsParams() throws Exception {
    MetricSeriesTags expectedTags = new MetricSeriesTags().addTags("t1", "p2");
    MethodParameters parameters = new CustomParameters().addParameter("tags.t1", "p*").addParameter("tags.t2", "v2").addParameter("tags", "t1");
    MetricSeriesTags responseTags = queryMetricSeriesTags(METRIC_NAME, parameters).readEntity(MetricSeriesTags.class);
    assertEquals("Wrong result for {metric}/series/tags with tags and tags.name wildcard parameters", expectedTags, responseTags);
}
Also used : MetricSeriesTags(com.axibase.tsd.api.model.series.metric.MetricSeriesTags) MethodParameters(com.axibase.tsd.api.method.MethodParameters) CustomParameters(com.axibase.tsd.api.method.CustomParameters) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 33 with Issue

use of io.qameta.allure.Issue in project atsd-api-test by axibase.

the class MetricSeriesTagsTest method testMetricSeriesTagsTagNameParams.

@Issue("4715")
@Test(description = "Test {metric}/series/tags with tags.name parameter")
public void testMetricSeriesTagsTagNameParams() throws Exception {
    MetricSeriesTags expectedTags = new MetricSeriesTags().addTags("t1", "v1").addTags("t2", "v2");
    MethodParameters parameters = new CustomParameters().addParameter("tags.t1", "v1").addParameter("tags.t2", "v2");
    MetricSeriesTags responseTags = queryMetricSeriesTags(METRIC_NAME, parameters).readEntity(MetricSeriesTags.class);
    assertEquals("Wrong result for {metric}/series/tags with tags.name parameter", expectedTags, responseTags);
}
Also used : MetricSeriesTags(com.axibase.tsd.api.model.series.metric.MetricSeriesTags) MethodParameters(com.axibase.tsd.api.method.MethodParameters) CustomParameters(com.axibase.tsd.api.method.CustomParameters) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 34 with Issue

use of io.qameta.allure.Issue in project atsd-api-test by axibase.

the class MetricSeriesTagsTest method testMetricSeriesTagsTagPatternParam.

@Issue("4715")
@Test(description = "Test {metric}/series/tags with wildcard tags parameters")
public void testMetricSeriesTagsTagPatternParam() throws Exception {
    MetricSeriesTags expectedTags = new MetricSeriesTags().addTags("t1", "v1", "v2").addTags("t2", "v1", "v2");
    MethodParameters parameters = new CustomParameters().addParameter("tags.t1", "v*");
    MetricSeriesTags responseTags = queryMetricSeriesTags(METRIC_NAME, parameters).readEntity(MetricSeriesTags.class);
    assertEquals("Wrong result for {metric}/series/tags with wildcard tags parameters", expectedTags, responseTags);
}
Also used : MetricSeriesTags(com.axibase.tsd.api.model.series.metric.MetricSeriesTags) MethodParameters(com.axibase.tsd.api.method.MethodParameters) CustomParameters(com.axibase.tsd.api.method.CustomParameters) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 35 with Issue

use of io.qameta.allure.Issue in project atsd-api-test by axibase.

the class MetricSeriesTagsTest method testMetricSeriesTagsNoSecondTag.

@Issue("4715")
@Test(description = "Test {metric}/series/tags with existing but irrelevant tags.name")
public void testMetricSeriesTagsNoSecondTag() throws Exception {
    MetricSeriesTags expectedTags = new MetricSeriesTags();
    MethodParameters parameters = new CustomParameters().addParameter("tags.t1", "x1").addParameter("tags.t2", "v2");
    MetricSeriesTags responseTags = queryMetricSeriesTags(METRIC_NAME, parameters).readEntity(MetricSeriesTags.class);
    assertEquals("Wrong result for {metric}/series/tags with existing but irrelevant tags.name", expectedTags, responseTags);
}
Also used : MetricSeriesTags(com.axibase.tsd.api.model.series.metric.MetricSeriesTags) MethodParameters(com.axibase.tsd.api.method.MethodParameters) CustomParameters(com.axibase.tsd.api.method.CustomParameters) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Aggregations

Issue (io.qameta.allure.Issue)858 Test (org.testng.annotations.Test)857 SqlTest (com.axibase.tsd.api.method.sql.SqlTest)377 StringTable (com.axibase.tsd.api.model.sql.StringTable)270 Response (javax.ws.rs.core.Response)234 List (java.util.List)166 SeriesQuery (com.axibase.tsd.api.model.series.query.SeriesQuery)145 Series (com.axibase.tsd.api.model.series.Series)88 Property (com.axibase.tsd.api.model.property.Property)84 BigDecimal (java.math.BigDecimal)53 Metric (com.axibase.tsd.api.model.metric.Metric)50 Period (com.axibase.tsd.api.model.Period)47 PropertyQuery (com.axibase.tsd.api.model.property.PropertyQuery)44 Entity (com.axibase.tsd.api.model.entity.Entity)43 ArrayList (java.util.ArrayList)37 Message (com.axibase.tsd.api.model.message.Message)32 PlainCommand (com.axibase.tsd.api.model.command.PlainCommand)31 HashMap (java.util.HashMap)30 EntityGroup (com.axibase.tsd.api.model.entitygroup.EntityGroup)29 Aggregate (com.axibase.tsd.api.model.series.query.transformation.aggregate.Aggregate)29