Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F8321773
test_docker.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
857 B
Referenced Files
None
Subscribers
None
test_docker.py
View Options
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
.
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"
)
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Tue, May 13, 16:51 (21 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2610572
Default Alt Text
test_docker.py (857 B)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment