test/builder: check ssl_verify can be a string
The ssl_verify config option can be a string, i.e. a path to the certificate authority for the server side certificate. Check that we handle that properly.
This commit is contained in:
parent
bae564a1ab
commit
94f7b35967
1 changed files with 15 additions and 0 deletions
|
|
@ -190,6 +190,21 @@ class TestBuilderPlugin(PluginTest):
|
|||
self.assertEqual(session.cert, certs)
|
||||
self.assertEqual(session.verify, ssl_verify)
|
||||
|
||||
# check we can handle a path in ssl_verify
|
||||
ssl_verify = "/a/path/to/a/ca"
|
||||
cfg["composer"]["ssl_verify"] = ssl_verify
|
||||
cfgfile = os.path.abspath(os.path.join(tmp, "ko.cfg"))
|
||||
with open(cfgfile, 'w') as f:
|
||||
cfg.write(f)
|
||||
|
||||
handler = self.plugin.OSBuildImage(1,
|
||||
"osbuildImage",
|
||||
"params",
|
||||
session,
|
||||
options)
|
||||
session = handler.client.http
|
||||
self.assertEqual(session.verify, ssl_verify)
|
||||
|
||||
def test_unknown_build_target(self):
|
||||
session = flexmock()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue