fix cloudwatch annotation, reflect API change

This commit is contained in:
Mitsuhiro Tanda
2015-11-13 22:09:00 +09:00
parent 79c8556927
commit e22e20fa9d
2 changed files with 16 additions and 9 deletions

View File

@@ -191,11 +191,17 @@ describe('CloudWatchDatasource', function() {
});
describe('When performing annotationQuery', function() {
var annotation = {
region: 'us-east-1',
namespace: 'AWS/EC2',
metricName: 'CPUUtilization',
dimensions: 'InstanceId=i-12345678'
var parameter = {
annotation: {
region: 'us-east-1',
namespace: 'AWS/EC2',
metricName: 'CPUUtilization',
dimensions: 'InstanceId=i-12345678'
},
range: {
from: moment(1443438674760),
to: moment(1443460274760)
}
};
var alarmResponse = {
MetricAlarms: [
@@ -228,7 +234,7 @@ describe('CloudWatchDatasource', function() {
};
});
it('should return annotation list', function(done) {
ctx.ds.annotationQuery(annotation, {from: moment(1443438674760), to: moment(1443460274760)}).then(function(result) {
ctx.ds.annotationQuery(parameter).then(function(result) {
expect(result[0].title).to.be('test_alarm_name');
expect(result[0].text).to.be('test_history_summary');
done();