Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos
Commits
d1c804fc
Commit
d1c804fc
authored
Nov 22, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/slapos-sr-testing: enable test for grafana
parent
32445b30
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
6 deletions
+16
-6
software/grafana/test/test.py
software/grafana/test/test.py
+9
-4
software/slapos-sr-testing/buildout.hash.cfg
software/slapos-sr-testing/buildout.hash.cfg
+1
-1
software/slapos-sr-testing/instance.cfg
software/slapos-sr-testing/instance.cfg
+1
-1
software/slapos-sr-testing/software.cfg
software/slapos-sr-testing/software.cfg
+5
-0
No files found.
software/grafana/test/test.py
View file @
d1c804fc
...
...
@@ -107,7 +107,7 @@ class TestInfluxDb(GrafanaTestCase):
query_url
=
'{self.influxdb_url}/query'
.
format
(
**
locals
())
connection_params
=
self
.
computer_partition
.
getConnectionParameterDict
()
for
i
in
range
(
5
):
for
i
in
range
(
10
):
# retry, as it may take a little delay to create databases
resp
=
requests
.
get
(
query_url
,
...
...
@@ -118,7 +118,7 @@ class TestInfluxDb(GrafanaTestCase):
p
=
connection_params
[
'influxdb-password'
]))
self
.
assertEqual
(
requests
.
codes
.
ok
,
resp
.
status_code
)
result
,
=
resp
.
json
()[
'results'
]
if
result
[
'series'
]:
if
result
[
'series'
]
and
'values'
in
result
[
'series'
][
0
]
:
break
time
.
sleep
(
0.5
*
i
)
...
...
@@ -201,9 +201,14 @@ class TestLoki(GrafanaTestCase):
time
.
sleep
(
0.5
*
i
)
continue
warn_stream
,
=
[
stream
for
stream
in
resp
[
'streams'
]
if
'level="WARNING"'
in
stream
[
'labels'
]]
warn_stream_list
=
[
stream
for
stream
in
resp
[
'streams'
]
if
'level="WARNING"'
in
stream
[
'labels'
]]
self
.
assertEqual
(
1
,
len
(
warn_stream_list
),
resp
[
'streams'
])
warn_stream
,
=
warn_stream_list
self
.
assertIn
(
"testing warn"
,
warn_stream
[
'entries'
][
0
][
'line'
])
info_stream
,
=
[
stream
for
stream
in
resp
[
'streams'
]
if
'level="INFO"'
in
stream
[
'labels'
]]
info_stream_list
=
[
stream
for
stream
in
resp
[
'streams'
]
if
'level="INFO"'
in
stream
[
'labels'
]]
self
.
assertEqual
(
1
,
len
(
info_stream_list
),
resp
[
'streams'
])
info_stream
,
=
info_stream_list
self
.
assertTrue
(
[
line
for
line
in
info_stream
[
'entries'
]
...
...
software/slapos-sr-testing/buildout.hash.cfg
View file @
d1c804fc
...
...
@@ -15,4 +15,4 @@
[template]
filename = instance.cfg
md5sum =
4664f7dae66d3f582e34cec2ca627501
md5sum =
1cbab58e896ff63575f6a67db530d183
software/slapos-sr-testing/instance.cfg
View file @
d1c804fc
...
...
@@ -28,7 +28,7 @@ bin = $${buildout:directory}/bin
working-dir = $${buildout:directory}/tmp
[test-list]
path_list = ${slapos.cookbook-setup:setup},${slapos.test.caddy-frontend-setup:setup},${slapos.test.erp5-setup:setup},${slapos.test.slapos-master-setup:setup},${slapos.test.kvm-setup:setup},${slapos.test.monitor-setup:setup},${slapos.test.plantuml-setup:setup},${slapos.test.powerdns-setup:setup},${slapos.test.proftpd-setup:setup},${slapos.test.re6stnet-setup:setup},${slapos.test.seleniumserver-setup:setup},${slapos.test.slaprunner-setup:setup},${slapos.test.helloworld-setup:setup},${slapos.test.jupyter-setup:setup},${slapos.test.nextcloud-setup:setup},${slapos.test.turnserver-setup:setup},${slapos.test.theia-setup:setup}
path_list = ${slapos.cookbook-setup:setup},${slapos.test.caddy-frontend-setup:setup},${slapos.test.erp5-setup:setup},${slapos.test.slapos-master-setup:setup},${slapos.test.kvm-setup:setup},${slapos.test.monitor-setup:setup},${slapos.test.plantuml-setup:setup},${slapos.test.powerdns-setup:setup},${slapos.test.proftpd-setup:setup},${slapos.test.re6stnet-setup:setup},${slapos.test.seleniumserver-setup:setup},${slapos.test.slaprunner-setup:setup},${slapos.test.helloworld-setup:setup},${slapos.test.jupyter-setup:setup},${slapos.test.nextcloud-setup:setup},${slapos.test.turnserver-setup:setup},${slapos.test.theia-setup:setup}
,${slapos.test.grafana-setup:setup}
[slapos-test-runner]
recipe = slapos.cookbook:wrapper
...
...
software/slapos-sr-testing/software.cfg
View file @
d1c804fc
...
...
@@ -107,6 +107,11 @@ setup = ${slapos-repository:location}/software/turnserver/test/
egg = slapos.test.theia
setup = ${slapos-repository:location}/software/theia/test/
[slapos.test.grafana-setup]
<= setup-develop-egg
egg = slapos.test.grafana
setup = ${slapos-repository:location}/software/grafana/test/
[slapos.core-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.core.git
...
...
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