Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F13144853
test_docker.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
862 B
Referenced Files
None
Subscribers
None
test_docker.py
View Options
#!/usr/bin/env python3
import
unittest
import
yaml
PILLAR_FILE
=
"../pillar/paas/docker.sls"
class
Testinstance
(
unittest
.
TestCase
):
def
setUp
(
self
):
with
open
(
PILLAR_FILE
,
"r"
)
as
fd
:
self
.
pillar
=
yaml
.
safe_load
(
fd
)
# nginx needs a host/app_port pair to spawn a configuration
def
test_host_is_paired_with_app_port_option
(
self
):
for
node
,
services
in
self
.
pillar
[
"docker_containers"
]
.
items
():
for
service
,
containers
in
services
.
items
():
for
instance
,
container
in
containers
.
items
():
if
"host"
not
in
container
:
continue
entry
=
":"
.
join
([
"docker_containers"
,
node
,
service
,
instance
])
self
.
assertIn
(
"app_port"
,
container
,
entry
+
": app_port missing"
)
if
__name__
==
"__main__"
:
unittest
.
main
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Fri, Nov 21, 17:08 (19 m, 28 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3174527
Default Alt Text
test_docker.py (862 B)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment