Commit db668953 authored by Łukasz Nowak's avatar Łukasz Nowak

Check if file was really uploaded.

In addition comment why it does not work.
parent c4dec598
......@@ -296,6 +296,8 @@ def make_buildout(executable=None):
def get_filename_from_upload_network_cached(**kw):
""" Check the upload network cache. """
# Note: Since slapos.libnetworkcache is not directly available in testing
# environment this assertions will not work.
import logging
import json
logger = logging.getLogger('zc.buildout')
......@@ -304,7 +306,8 @@ def get_filename_from_upload_network_cached(**kw):
signature_certificate_file='',
signature_private_key_file=None)
kw.update(default_params)
zc.buildout.networkcache.upload_network_cached(**kw)
if not zc.buildout.networkcache.upload_network_cached(**kw):
return 'Upload failed.'
# check the file created.
external_url = kw.get('external_url')
......
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