Commit dd8d3dcc authored by Lucas Carvalho's avatar Lucas Carvalho Committed by Łukasz Nowak

Added a new method to create signature files.

This method is a wrapper to the signature script which is available at
slapos.libnetworkcache.git.

We should provide this method to be able to create the files required
during the test of signature feature on network.txt doctest.
parent 7f676525
......@@ -361,6 +361,15 @@ def buildoutSetUp(test):
register_teardown(lambda: stop_server(url, thread))
return url
def create_signature_file_list(path,
private_key_file='private.pem',
certificate_file='public.pem'):
from slapos.signature import createPrivateKeyAndCertificateFile
private_key_file = os.path.join(path, private_key_file)
certificate_file = os.path.join(path, certificate_file)
createPrivateKeyAndCertificateFile(certificate_file, private_key_file)
return certificate_file, private_key_file
def make_py(initialization=''):
"""Returns paths to new executable and to its site-packages.
"""
......@@ -425,6 +434,7 @@ def buildoutSetUp(test):
bdist_egg = bdist_egg,
start_server = start_server,
start_nc = start_nc,
create_signature_file_list = create_signature_file_list,
buildout = os.path.join(sample, 'bin', 'buildout'),
wait_until = wait_until,
make_py = make_py
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment