mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboard: replace datasource name with a reference object (#33817)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com> Co-authored-by: Elfo404 <me@giordanoricci.com>
This commit is contained in:
@@ -108,6 +108,7 @@ function describeQueryRunnerScenario(
|
||||
|
||||
const datasource: any = {
|
||||
name: 'TestDB',
|
||||
uid: 'TestDB-uid',
|
||||
interval: ctx.dsInterval,
|
||||
query: (options: grafanaData.DataQueryRequest) => {
|
||||
ctx.queryCalledWith = options;
|
||||
@@ -156,8 +157,8 @@ describe('PanelQueryRunner', () => {
|
||||
expect(ctx.queryCalledWith?.requestId).toBe('Q100');
|
||||
});
|
||||
|
||||
it('should set datasource name on request', async () => {
|
||||
expect(ctx.queryCalledWith?.targets[0].datasource).toBe('TestDB');
|
||||
it('should set datasource uid on request', async () => {
|
||||
expect(ctx.queryCalledWith?.targets[0].datasource?.uid).toBe('TestDB-uid');
|
||||
});
|
||||
|
||||
it('should pass scopedVars to datasource with interval props', async () => {
|
||||
|
||||
Reference in New Issue
Block a user