py27 runtests: PYTHONHASHSEED='2937801310'
py27 runtests: commands[0] | py.test
============================= test session starts ==============================
platform linux2 -- Python 2.7.9, pytest-2.8.5, py-1.4.31, pluggy-0.3.1
rootdir: /home/mbruzek/workspace/layers/tls, inifile:
collected 3 items
unit_tests/test_actions.py FFF
=================================== FAILURES ===================================
___________________________________ test_ca ____________________________________
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x7f69ebe6a7a0>
def test_ca(monkeypatch):
monkeypatch.setenv('JUJU_UNIT_NAME', 'test-tls')
ca()
> assert os.path.isfile('/tmp/tls-test.crt')
E assert <function isfile at 0x7f69ee581050>('/tmp/tls-test.crt')
E + where <function isfile at 0x7f69ee581050> = <module 'posixpath' from '/home/mbruzek/workspace/layers/tls/.tox/py27/lib/python2.7/posixpath.pyc'>.isfile
E + where <module 'posixpath' from '/home/mbruzek/workspace/layers/tls/.tox/py27/lib/python2.7/posixpath.pyc'> = os.path
unit_tests/test_actions.py:19: AssertionError
_______________________________ test_client_cert _______________________________
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x7f69ebb78dd0>
def test_client_cert(monkeypatch):
monkeypatch.setenv('JUJU_UNIT_NAME', 'test-tls')
client_cert()
> assert os.path.isfile('/tmp/client.crt')
E assert <function isfile at 0x7f69ee581050>('/tmp/client.crt')
E + where <function isfile at 0x7f69ee581050> = <module 'posixpath' from '/home/mbruzek/workspace/layers/tls/.tox/py27/lib/python2.7/posixpath.pyc'>.isfile
E + where <module 'posixpath' from '/home/mbruzek/workspace/layers/tls/.tox/py27/lib/python2.7/posixpath.pyc'> = os.path
unit_tests/test_actions.py:29: AssertionError
_______________________________ test_server_cert _______________________________
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x7f69eb635998>
def test_server_cert(monkeypatch):
monkeypatch.setenv('JUJU_UNIT_NAME', 'test-tls')
> server_cert()
unit_tests/test_actions.py:39:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
unit_tests/test_actions.py:35: in server_cert
sc("/tmp", '/tmp/client.key')
lib/tlslib.py:29: in server_cert
_copy_key(destination_directory, 'server', server_key_path)
lib/tlslib.py:130: in _copy_key
copy2(key_path, destination_key_path)
/usr/lib/python2.7/shutil.py:130: in copy2
copyfile(src, dst)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src = '/tmp/client.key', dst = '/tmp/server.key'
def copyfile(src, dst):
"""Copy data from src to dst"""
if _samefile(src, dst):
raise Error("`%s` and `%s` are the same file" % (src, dst))
for fn in [src, dst]:
try:
st = os.stat(fn)
except OSError:
# File most likely does not exist
pass
else:
# XXX What about other special files? (sockets, devices...)
if stat.S_ISFIFO(st.st_mode):
raise SpecialFileError("`%s` is a named pipe" % fn)
> with open(src, 'rb') as fsrc:
E IOError: [Errno 2] No such file or directory: '/tmp/client.key'
/usr/lib/python2.7/shutil.py:82: IOError
=========================== 3 failed in 0.08 seconds ===========================
ERROR: InvocationError: '/home/mbruzek/workspace/layers/tls/.tox/py27/bin/py.test'
___________________________________ summary ____________________________________
ERROR: py27: commands failed