diff --git a/public/app/plugins/datasource/graphite/specs/query_ctrl_specs.ts b/public/app/plugins/datasource/graphite/specs/query_ctrl_specs.ts index e88fbc044c1..ff1ea9449ee 100644 --- a/public/app/plugins/datasource/graphite/specs/query_ctrl_specs.ts +++ b/public/app/plugins/datasource/graphite/specs/query_ctrl_specs.ts @@ -24,6 +24,11 @@ describe('GraphiteQueryCtrl', function() { ctx.target = {target: 'aliasByNode(scaleToSeconds(test.prod.*,1),2)'}; ctx.datasource.metricFindQuery = sinon.stub().returns(ctx.$q.when([])); ctx.panelCtrl = {panel: {}}; + ctx.panelCtrl = { + panel: { + targets: [ctx.target] + } + }; ctx.panelCtrl.refresh = sinon.spy(); ctx.ctrl = $controller(GraphiteQueryCtrl, {$scope: ctx.scope}, { diff --git a/public/app/plugins/datasource/influxdb/specs/query_ctrl_specs.ts b/public/app/plugins/datasource/influxdb/specs/query_ctrl_specs.ts index 44b593edc0e..ec433249097 100644 --- a/public/app/plugins/datasource/influxdb/specs/query_ctrl_specs.ts +++ b/public/app/plugins/datasource/influxdb/specs/query_ctrl_specs.ts @@ -19,9 +19,13 @@ describe('InfluxDBQueryCtrl', function() { ctx.$q = $q; ctx.scope = $rootScope.$new(); ctx.datasource.metricFindQuery = sinon.stub().returns(ctx.$q.when([])); - ctx.panelCtrl = {panel: {}}; - ctx.panelCtrl.refresh = sinon.spy(); ctx.target = {target: {}}; + ctx.panelCtrl = { + panel: { + targets: [ctx.target] + } + }; + ctx.panelCtrl.refresh = sinon.spy(); ctx.ctrl = $controller(InfluxQueryCtrl, {$scope: ctx.scope}, { panelCtrl: ctx.panelCtrl, target: ctx.target, diff --git a/public/app/plugins/datasource/opentsdb/specs/query-ctrl-specs.ts b/public/app/plugins/datasource/opentsdb/specs/query-ctrl-specs.ts index 644af1e7bf7..0d3a44858f4 100644 --- a/public/app/plugins/datasource/opentsdb/specs/query-ctrl-specs.ts +++ b/public/app/plugins/datasource/opentsdb/specs/query-ctrl-specs.ts @@ -18,7 +18,11 @@ describe('OpenTsQueryCtrl', function() { ctx.$q = $q; ctx.scope = $rootScope.$new(); ctx.target = {target: ''}; - ctx.panelCtrl = {panel: {}}; + ctx.panelCtrl = { + panel: { + targets: [ctx.target] + } + }; ctx.panelCtrl.refresh = sinon.spy(); ctx.datasource.getAggregators = sinon.stub().returns(ctx.$q.when([])); ctx.datasource.getFilterTypes = sinon.stub().returns(ctx.$q.when([]));