Commit 7a272fea authored by Łukasz Nowak's avatar Łukasz Nowak

Check download cache failure.

parent 468ad85a
...@@ -137,7 +137,7 @@ Upload is optional, and then no upload will be tried: ...@@ -137,7 +137,7 @@ Upload is optional, and then no upload will be tried:
... ''' % globals()) ... ''' % globals())
>>> print system(buildout) >>> print system(buildout)
Networkcache enabled. Networkcache enabled.
Networkcache download cache: 'http://localhost:27617/shacache', directory 'http://localhost:27617/shadir' Networkcache download cache: 'http://localhost/shacache', directory 'http://localhost/shadir'
Networkcache upload cache: '', directory '' Networkcache upload cache: '', directory ''
Installing eggs. Installing eggs.
Getting distribution for 'demo'. Getting distribution for 'demo'.
...@@ -148,3 +148,49 @@ Upload is optional, and then no upload will be tried: ...@@ -148,3 +148,49 @@ Upload is optional, and then no upload will be tried:
Downloading demoneeded-1.2c1.zip from network cache. Downloading demoneeded-1.2c1.zip from network cache.
Got demoneeded 1.2c1. Got demoneeded 1.2c1.
<BLANKLINE> <BLANKLINE>
Now lets clean up buildout directory:
>>> import os, glob
>>> [remove(q) for q in glob.glob(os.path.join(sample_buildout, 'eggs', 'demo*'))]
[None, None]
>>> remove('.installed.cfg')
In case if download cache is failing, original resources are used:
>>> write(sample_buildout, 'buildout.cfg',
... '''
... [buildout]
...
... networkcache-section = networkcache
... find-links = %(link_server)s
... parts = eggs
...
... [eggs]
... recipe = zc.recipe.egg:eggs
... eggs = demo
...
... [networkcache]
... download-cache-url = http://127.0.0.1:1/shacache
... download-dir-url = http://127.0.0.1:1/shadir
... upload-cache-url = http://127.0.0.1:1/sshacache
... upload-dir-url = http://127.0.0.1:1/sshadir
... ''' % globals())
>>> print system(buildout)
Networkcache enabled.
Networkcache download cache: 'http://127.0.0.1:1/shacache', directory 'http://127.0.0.1:1/shadir'
Networkcache upload cache: 'http://127.0.0.1:1/sshacache', directory 'http://127.0.0.1:1/sshadir'
Installing eggs.
Getting distribution for 'demo'.
Downloading demo-0.4c1-py2.7.egg from network cache.
Failed to download from network cache demo-0.4c1-py2.7.egg: [Errno 111] Connection refused
Uploading http://localhost/demo-0.4c1-py2.7.egg into network cache.
Fail to upload file. [Errno 111] Connection refused
Got demo 0.4c1.
Getting distribution for 'demoneeded'.
Downloading demoneeded-1.2c1.zip from network cache.
Failed to download from network cache demoneeded-1.2c1.zip: [Errno 111] Connection refused
Uploading http://localhost/demoneeded-1.2c1.zip into network cache.
Fail to upload file. [Errno 111] Connection refused
Got demoneeded 1.2c1.
<BLANKLINE>
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