Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F53866439
test_certificates.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
967 B
Referenced Files
None
Subscribers
None
test_certificates.py
View Options
#!/usr/bin/env python3
import
unittest
import
salt_test_case
import
certificates
class
Testinstance
(
unittest
.
TestCase
,
salt_test_case
.
SaltTestCase
):
def
setUp
(
self
):
self
.
initialize_mocks
()
self
.
instance
=
certificates
self
.
mock_pillar
(
"data/pillar/certificates.yaml"
)
def
test_get_certificates_options
(
self
):
expected
=
{
"foo.domain.tld"
:
{
# Default option
"reload"
:
"nginx -s reload"
,
},
"bar.domain.tld"
:
{
# Default option
"reload"
:
"nginx -s reload"
,
# Specific option
"shared_group"
:
"baz"
,
},
"quux.domain.tld"
:
{
# Specific option
"reload"
:
"propagate-quux-certificate"
,
},
}
self
.
assertEqual
(
expected
,
self
.
instance
.
get_certificates_options
())
if
__name__
==
"__main__"
:
unittest
.
main
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Wed, Oct 14, 21:11 (29 m, 1 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4042421
Default Alt Text
test_certificates.py (967 B)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment