Search in sources :

Example 36 with Issue

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

the class MetricSeriesTagsTest method testMetricSeriesTagsEntity.

@Issue("4715")
@Test(description = "Test {metric}/series/tags entity parameter")
public void testMetricSeriesTagsEntity() throws Exception {
    MetricSeriesTags expectedTags = new MetricSeriesTags().addTags("t1", "x1");
    MethodParameters parameters = new CustomParameters().addParameter("entity", ENTITY_NAME2);
    MetricSeriesTags responseTags = queryMetricSeriesTags(METRIC_NAME, parameters).readEntity(MetricSeriesTags.class);
    assertEquals("Wrong result for {metric}/series/tags entity 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 37 with Issue

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

the class PropertyDeleteTest method testKeyValueNullExactTrue.

@Issue("2416")
@Test
public void testKeyValueNullExactTrue() throws Exception {
    final Property property = new Property("delete-type-22", "delete-entity22");
    property.addTag("t1", "v1");
    insertPropertyCheck(property);
    PropertyQuery deleteQuery = new PropertyQuery();
    deleteQuery.setType(property.getType());
    deleteQuery.setEntity(property.getEntity());
    deleteQuery.addKey("k1", null);
    deleteQuery.setExactMatch(true);
    assertEquals("Fail to execute delete query", OK.getStatusCode(), deleteProperty(deleteQuery).getStatus());
    assertFalse("Property should be deleted", propertyExist(property));
}
Also used : PropertyQuery(com.axibase.tsd.api.model.property.PropertyQuery) Property(com.axibase.tsd.api.model.property.Property) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 38 with Issue

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

the class PropertyDeleteTest method testKeyValueEmptyExactTrue.

@Issue("2416")
@Test
public void testKeyValueEmptyExactTrue() throws Exception {
    final Property property = new Property("delete-type-24", "delete-entity24");
    property.addTag("t1", "v1");
    insertPropertyCheck(property);
    PropertyQuery deleteQuery = new PropertyQuery();
    deleteQuery.setType(property.getType());
    deleteQuery.setEntity(property.getEntity());
    deleteQuery.addKey("k1", "");
    deleteQuery.setExactMatch(true);
    assertEquals("Fail to execute delete query", OK.getStatusCode(), deleteProperty(deleteQuery).getStatus());
    assertFalse("Property should be deleted", propertyExist(property));
}
Also used : PropertyQuery(com.axibase.tsd.api.model.property.PropertyQuery) Property(com.axibase.tsd.api.model.property.Property) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 39 with Issue

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

the class PropertyDeleteTest method testKeyValueContainsSpaces.

@Issue("2416")
@Test
public void testKeyValueContainsSpaces() throws Exception {
    final Property property = new Property("delete-type-27", "delete-entity27");
    property.addTag("t1", "v1");
    property.addKey("k1", "kv1");
    insertPropertyCheck(property);
    PropertyQuery deleteQuery = new PropertyQuery();
    deleteQuery.setType(property.getType());
    deleteQuery.setEntity(property.getEntity());
    deleteQuery.addKey("k1", "  kv1   ");
    assertEquals("Fail to execute delete query", OK.getStatusCode(), deleteProperty(deleteQuery).getStatus());
    assertFalse("Property should be deleted", propertyExist(property));
}
Also used : PropertyQuery(com.axibase.tsd.api.model.property.PropertyQuery) Property(com.axibase.tsd.api.model.property.Property) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 40 with Issue

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

the class PropertyDeleteTest method testKeyValueInteger.

@Issue("2416")
@Test
public void testKeyValueInteger() throws Exception {
    final Property property = new Property("delete-type-28", "delete-entity28");
    property.addTag("t1", "v1");
    property.addKey("k1", "111");
    insertPropertyCheck(property);
    Map<String, Object> deleteQuery = new HashMap<>();
    deleteQuery.put("type", property.getType());
    deleteQuery.put("entity", property.getEntity());
    deleteQuery.put("startDate", MIN_QUERYABLE_DATE);
    deleteQuery.put("endDate", MAX_QUERYABLE_DATE);
    Map<String, Object> key = new HashMap<>();
    key.put("k1", 111);
    deleteQuery.put("key", key);
    assertEquals("Fail to execute delete query", OK.getStatusCode(), deleteProperty(deleteQuery).getStatus());
    assertFalse("Property should be deleted", propertyExist(property));
}
Also used : HashMap(java.util.HashMap) Property(com.axibase.tsd.api.model.property.Property) 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