use of com.axibase.tsd.api.model.metric.Metric in project atsd-api-test by axibase.
the class MetricCommandTest method testTimezone.
@Issue("3137")
@Test
public void testTimezone() throws Exception {
Metric metric = new Metric(metric());
metric.setFilter("GMT0");
MetricCommand command = new MetricCommand(metric);
CommandMethod.send(command);
String assertMessage = String.format("Failed to insert metric with filter expression: %s", metric.getTimeZoneID());
assertMetricExisting(assertMessage, metric);
}
use of com.axibase.tsd.api.model.metric.Metric in project atsd-api-test by axibase.
the class MetricCommandTest method testLabel.
@Issue("3137")
@Test
public void testLabel() throws Exception {
Metric metric = new Metric(metric());
metric.setLabel(Mocks.LABEL);
MetricCommand command = new MetricCommand(metric);
CommandMethod.send(command);
String assertMessage = String.format("Failed to insert metric with label: %s", metric.getLabel());
assertMetricExisting(assertMessage, metric);
}
use of com.axibase.tsd.api.model.metric.Metric in project atsd-api-test by axibase.
the class MetricDeleteTest method testMetricNameContainsSlash.
@Issue("1278")
@Test
public void testMetricNameContainsSlash() throws Exception {
final Metric metric = new Metric("delete/metric-2");
createOrReplaceMetricCheck(metric);
Response response = deleteMetric(metric.getName());
assertEquals("Fail to execute deleteMetric query", OK.getStatusCode(), response.getStatus());
assertFalse("Metric should be deleted", metricExist(metric));
}
use of com.axibase.tsd.api.model.metric.Metric in project atsd-api-test by axibase.
the class MetricDeleteTest method testMetricNameContainsCyrillic.
@Issue("1278")
@Test
public void testMetricNameContainsCyrillic() throws Exception {
final Metric metric = new Metric("deleteйёmetric-3");
createOrReplaceMetricCheck(metric);
assertEquals("Fail to execute deleteMetric query", OK.getStatusCode(), deleteMetric(metric.getName()).getStatus());
assertFalse("Metric should be deleted", metricExist(metric));
}
use of com.axibase.tsd.api.model.metric.Metric in project atsd-api-test by axibase.
the class MetricSeriesTest method testMetricNameContainsSlash.
@Issue("1278")
@Test
public void testMetricNameContainsSlash() throws Exception {
final Metric metric = new Metric("series/metric-2");
createOrReplaceMetricCheck(metric);
assertTrue("series array should be empty", compareJsonString("[]", queryMetricSeries(metric.getName()).readEntity(String.class)));
}
Aggregations