use of com.axibase.tsd.api.model.entity.Entity in project atsd-api-test by axibase.
the class EntityCreateOrReplaceTest method testEmptyTagsReplaceExisting.
@Issue("1968")
@Test
public void testEmptyTagsReplaceExisting() throws Exception {
Entity entity = new Entity("create-entity-9");
entity.addTag("tagkey", "tagvalue");
createOrReplaceEntityCheck(entity);
entity.setTags(new HashMap<String, String>());
try {
createOrReplaceEntityCheck(entity);
} catch (IllegalStateException e) {
fail("Fail to replace tags if new tags are empty");
}
}
use of com.axibase.tsd.api.model.entity.Entity in project atsd-api-test by axibase.
the class EntityGetGroupsTest method testEntityNameContainsSlash.
@Issue("1278")
@Test
public void testEntityNameContainsSlash() throws Exception {
Entity entity = new Entity("getgroups/entity-2");
createOrReplaceEntityCheck(entity);
assertUrlencodedPathHandledSuccessfullyOnGetGroups(entity);
}
use of com.axibase.tsd.api.model.entity.Entity in project atsd-api-test by axibase.
the class EntityGetGroupsTest method testEntityNameContainsCyrillic.
@Issue("1278")
@Test
public void testEntityNameContainsCyrillic() throws Exception {
Entity entity = new Entity("getgroupsйёentity-3");
createOrReplaceEntityCheck(entity);
assertUrlencodedPathHandledSuccessfullyOnGetGroups(entity);
}
use of com.axibase.tsd.api.model.entity.Entity in project atsd-api-test by axibase.
the class EntityGetPropertyTypesTest method testEntityNameContainsCyrillic.
@Issue("1278")
@Test
public void testEntityNameContainsCyrillic() throws Exception {
Entity entity = new Entity("get_property_types_йёentity-3");
createOrReplaceEntityCheck(entity);
assertUrlencodedPathHandledSuccessfullyOnGetPropertyTypes(entity);
}
use of com.axibase.tsd.api.model.entity.Entity in project atsd-api-test by axibase.
the class GroupByEntityTagTest method prepareData.
@BeforeClass
public static void prepareData() throws Exception {
List<Series> seriesList = new ArrayList<>();
String[] tags = { "1", "-1", "-3.14", "word", "word1 word2_" };
Metric metric = new Metric(TEST_METRIC_NAME);
MetricMethod.createOrReplaceMetricCheck(metric);
ZonedDateTime seriesStartDate = ZonedDateTime.parse("2016-01-01T00:00:00Z");
for (int i = 0; i < tags.length; i++) {
String testEntityNameTagsCase = entity();
Entity entity = new Entity(testEntityNameTagsCase);
entity.addTag("tagname", tags[i]);
EntityMethod.createOrReplaceEntityCheck(entity);
Series series = new Series();
series.setEntity(testEntityNameTagsCase);
series.setMetric(TEST_METRIC_NAME);
series.addSamples(Sample.ofDateInteger(seriesStartDate.plusSeconds(i).toString(), i), Sample.ofDateInteger(seriesStartDate.plusSeconds(i + 60).toString(), i + 1));
seriesList.add(series);
}
SeriesMethod.insertSeriesCheck(seriesList);
}
Aggregations