Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
1aba5f81
Commit
1aba5f81
authored
Sep 24, 2018
by
Daniel Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stackdriver: fix test after parameter added to constructor
parent
4777689f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
public/app/plugins/datasource/stackdriver/specs/datasource.test.ts
+9
-8
No files found.
public/app/plugins/datasource/stackdriver/specs/datasource.test.ts
View file @
1aba5f81
...
...
@@ -10,6 +10,7 @@ describe('StackdriverDataSource', () => {
},
};
const
templateSrv
=
new
TemplateSrvStub
();
const
timeSrv
=
{};
describe
(
'when performing testDataSource'
,
()
=>
{
describe
(
'and call to stackdriver api succeeds'
,
()
=>
{
...
...
@@ -21,7 +22,7 @@ describe('StackdriverDataSource', () => {
return
Promise
.
resolve
({
status
:
200
});
},
};
ds
=
new
StackdriverDataSource
(
instanceSettings
,
backendSrv
,
templateSrv
);
ds
=
new
StackdriverDataSource
(
instanceSettings
,
backendSrv
,
templateSrv
,
timeSrv
);
result
=
await
ds
.
testDatasource
();
});
it
(
'should return successfully'
,
()
=>
{
...
...
@@ -36,7 +37,7 @@ describe('StackdriverDataSource', () => {
const
backendSrv
=
{
datasourceRequest
:
async
()
=>
Promise
.
resolve
({
status
:
200
,
data
:
metricDescriptors
}),
};
ds
=
new
StackdriverDataSource
(
instanceSettings
,
backendSrv
,
templateSrv
);
ds
=
new
StackdriverDataSource
(
instanceSettings
,
backendSrv
,
templateSrv
,
timeSrv
);
result
=
await
ds
.
testDatasource
();
});
it
(
'should return status success'
,
()
=>
{
...
...
@@ -55,7 +56,7 @@ describe('StackdriverDataSource', () => {
data
:
{
error
:
{
code
:
400
,
message
:
'Field interval.endTime had an invalid value'
}
},
}),
};
ds
=
new
StackdriverDataSource
(
instanceSettings
,
backendSrv
,
templateSrv
);
ds
=
new
StackdriverDataSource
(
instanceSettings
,
backendSrv
,
templateSrv
,
timeSrv
);
result
=
await
ds
.
testDatasource
();
});
...
...
@@ -91,7 +92,7 @@ describe('StackdriverDataSource', () => {
return
Promise
.
resolve
({
status
:
200
,
data
:
response
});
},
};
ds
=
new
StackdriverDataSource
(
instanceSettings
,
backendSrv
,
templateSrv
);
ds
=
new
StackdriverDataSource
(
instanceSettings
,
backendSrv
,
templateSrv
,
timeSrv
);
result
=
await
ds
.
getProjects
();
});
...
...
@@ -140,7 +141,7 @@ describe('StackdriverDataSource', () => {
const
backendSrv
=
{
datasourceRequest
:
async
()
=>
Promise
.
resolve
({
status
:
200
,
data
:
response
}),
};
ds
=
new
StackdriverDataSource
(
instanceSettings
,
backendSrv
,
templateSrv
);
ds
=
new
StackdriverDataSource
(
instanceSettings
,
backendSrv
,
templateSrv
,
timeSrv
);
});
it
(
'should return a list of datapoints'
,
()
=>
{
...
...
@@ -174,7 +175,7 @@ describe('StackdriverDataSource', () => {
});
},
};
ds
=
new
StackdriverDataSource
(
instanceSettings
,
backendSrv
,
templateSrv
);
ds
=
new
StackdriverDataSource
(
instanceSettings
,
backendSrv
,
templateSrv
,
timeSrv
);
result
=
await
ds
.
getMetricTypes
();
});
it
(
'should return successfully'
,
()
=>
{
...
...
@@ -192,7 +193,7 @@ describe('StackdriverDataSource', () => {
templateSrv
.
data
=
{
test
:
'groupby1'
,
};
const
ds
=
new
StackdriverDataSource
(
instanceSettings
,
{},
templateSrv
);
const
ds
=
new
StackdriverDataSource
(
instanceSettings
,
{},
templateSrv
,
timeSrv
);
interpolated
=
ds
.
interpolateGroupBys
([
'[[test]]'
],
{});
});
...
...
@@ -207,7 +208,7 @@ describe('StackdriverDataSource', () => {
templateSrv
.
data
=
{
test
:
'groupby1,groupby2'
,
};
const
ds
=
new
StackdriverDataSource
(
instanceSettings
,
{},
templateSrv
);
const
ds
=
new
StackdriverDataSource
(
instanceSettings
,
{},
templateSrv
,
timeSrv
);
interpolated
=
ds
.
interpolateGroupBys
([
'[[test]]'
],
{});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment