Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
slapos
Commits
7fb20c53
Commit
7fb20c53
authored
Oct 23, 2020
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new test
parent
7f8cd116
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
software/powerdns/test/test.py
software/powerdns/test/test.py
+24
-0
No files found.
software/powerdns/test/test.py
View file @
7fb20c53
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
##############################################################################
##############################################################################
import
os
import
os
import
requests
from
slapos.recipe.librecipe
import
generateHashFromFiles
from
slapos.recipe.librecipe
import
generateHashFromFiles
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
...
@@ -54,6 +55,9 @@ class ServicesTestCase(PowerDNSTestCase):
...
@@ -54,6 +55,9 @@ class ServicesTestCase(PowerDNSTestCase):
with
self
.
slap
.
instance_supervisor_rpc
as
supervisor
:
with
self
.
slap
.
instance_supervisor_rpc
as
supervisor
:
process_names
=
[
process
[
'name'
]
process_names
=
[
process
[
'name'
]
for
process
in
supervisor
.
getAllProcessInfo
()]
for
process
in
supervisor
.
getAllProcessInfo
()]
import
pdb
;
pdb
.
set_trace
()
a
=
0
hash_files
=
[
os
.
path
.
join
(
self
.
computer_partition_root_path
,
path
)
hash_files
=
[
os
.
path
.
join
(
self
.
computer_partition_root_path
,
path
)
for
path
in
hash_files
]
for
path
in
hash_files
]
...
@@ -63,3 +67,23 @@ class ServicesTestCase(PowerDNSTestCase):
...
@@ -63,3 +67,23 @@ class ServicesTestCase(PowerDNSTestCase):
expected_process_name
=
name
.
format
(
hash
=
h
)
expected_process_name
=
name
.
format
(
hash
=
h
)
self
.
assertIn
(
expected_process_name
,
process_names
)
self
.
assertIn
(
expected_process_name
,
process_names
)
def
test_zone
(
self
):
connection_parameter_dict
=
self
.
computer_partition
\
.
getConnectionParameterDict
()
import
pdb
;
pdb
.
set_trace
()
# (Pdb) p connection_parameter_dict
# {
# 'domain': 'None',
# 'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://[2001:67c:1254:e:d3::dbcc]:8099/public/feeds',
# 'monitor-user': 'admin',
# 'monitor-url': 'https://[2001:67c:1254:e:d3::dbcc]:8099/public/feeds',
# 'slave-amount': '0',
# 'ns-record': 'ns1.domain.com',
# 'monitor-password': 'carsltyo'
# }
result
=
requests
.
get
(
connection_parameter_dict
[
'url'
],
verify
=
False
)
self
.
assertEqual
(
httplib
.
OK
,
result
.
status_code
)
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