Search in sources :

Example 41 with Issue

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

the class PropertyDeleteTest method testKeyValueBoolean.

@Issue("2416")
@Test
public void testKeyValueBoolean() throws Exception {
    final Property property = new Property("delete-type-29", "delete-entity29");
    property.addTag("t1", "v1");
    property.addKey("k1", "true");
    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", true);
    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)

Example 42 with Issue

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

the class PropertyQueryTimezoneTest method testISOTimezonePlusHourMinute.

@Issue("2850")
@Test
public void testISOTimezonePlusHourMinute() throws Exception {
    PropertyQuery propertyQuery = buildPropertyQuery();
    propertyQuery.setStartDate("2016-05-21T01:23:00+01:23");
    List<Property> storedPropertyList = queryProperty(propertyQuery).readEntity(new GenericType<List<Property>>() {
    });
    Property storedProperty = storedPropertyList.get(0);
    assertEquals("Incorrect property entity", property.getEntity(), storedProperty.getEntity());
    assertEquals("Incorrect property tags", property.getTags(), storedProperty.getTags());
    assertEquals("Incorrect property date", property.getDate(), storedProperty.getDate());
}
Also used : PropertyQuery(com.axibase.tsd.api.model.property.PropertyQuery) List(java.util.List) Property(com.axibase.tsd.api.model.property.Property) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 43 with Issue

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

the class PropertyQueryTimezoneTest method testISOTimezoneMinusHourMinute.

@Issue("2850")
@Test
public void testISOTimezoneMinusHourMinute() throws Exception {
    PropertyQuery propertyQuery = buildPropertyQuery();
    propertyQuery.setStartDate("2016-05-20T22:37:00-01:23");
    List<Property> storedPropertyList = queryProperty(propertyQuery).readEntity(new GenericType<List<Property>>() {
    });
    Property storedProperty = storedPropertyList.get(0);
    assertEquals("Incorrect property entity", property.getEntity(), storedProperty.getEntity());
    assertEquals("Incorrect property tags", property.getTags(), storedProperty.getTags());
    assertEquals("Incorrect property date", property.getDate(), storedProperty.getDate());
}
Also used : PropertyQuery(com.axibase.tsd.api.model.property.PropertyQuery) List(java.util.List) Property(com.axibase.tsd.api.model.property.Property) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 44 with Issue

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

the class PropertyTypeQueryTest method testEntityNameContainsWhilespace.

@Issue("1278")
@Test
public void testEntityNameContainsWhilespace() {
    Property property = new Property("typequery-property-type-1", "typequery entityname-1");
    assertEquals(BAD_REQUEST.getStatusCode(), typeQueryProperty(property.getEntity()).getStatus());
}
Also used : Property(com.axibase.tsd.api.model.property.Property) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 45 with Issue

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

the class BackslashCharEscapeTest method testType.

@Issue("2854")
@Test
public void testType() throws Exception {
    Property property = new Property("property-command-test\\-t5", "property-command-test-e5");
    property.setTags(DEFAULT_PROPERTY_TAGS);
    property.setDate(getCurrentDate());
    PlainCommand command = new PropertyCommand(property);
    CommandMethod.send(command);
    assertPropertyExisting("Inserted property can not be received", property);
}
Also used : PlainCommand(com.axibase.tsd.api.model.command.PlainCommand) Property(com.axibase.tsd.api.model.property.Property) PropertyCommand(com.axibase.tsd.api.model.command.PropertyCommand) 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