======================================================================
ERROR: test_add_service_to_keystone_clustered_https_none_values (unit_tests.test_keystone_utils.TestKeystoneUtils)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/mock.py", line 1210, in patched
return func(*args, **keywargs)
File "/home/jamespage/src/charms/icehouse/keystone/unit_tests/test_keystone_utils.py", line 158, in test_add_service_to_keystone_clustered_https_none_values
utils.add_service_to_keystone(relation_id=relation_id, remote_unit=remote_unit)
File "hooks/keystone_utils.py", line 608, in add_service_to_keystone
manager = manager.KeystoneManager(endpoint=get_local_endpoint(),
File "hooks/keystone_utils.py", line 272, in get_local_endpoint
determine_api_port(api_port('keystone-admin'))
File "hooks/charmhelpers/contrib/hahelpers/cluster.py", line 122, in determine_api_port
if len(peer_units()) > 0 or is_clustered():
File "hooks/charmhelpers/contrib/hahelpers/cluster.py", line 59, in peer_units
for r_id in (relation_ids('cluster') or []):
File "hooks/charmhelpers/core/hookenv.py", line 44, in wrapper
res = func(*args, **kwargs)
File "hooks/charmhelpers/core/hookenv.py", line 213, in relation_ids
return json.loads(subprocess.check_output(relid_cmd_line)) or []
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
======================================================================
ERROR: test_add_service_to_keystone_no_clustered_no_https_complete_values (unit_tests.test_keystone_utils.TestKeystoneUtils)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/mock.py", line 1210, in patched
return func(*args, **keywargs)
File "/home/jamespage/src/charms/icehouse/keystone/unit_tests/test_keystone_utils.py", line 196, in test_add_service_to_keystone_no_clustered_no_https_complete_values
utils.add_service_to_keystone(relation_id=relation_id, remote_unit=remote_unit)
File "hooks/keystone_utils.py", line 608, in add_service_to_keystone
manager = manager.KeystoneManager(endpoint=get_local_endpoint(),
File "hooks/keystone_utils.py", line 272, in get_local_endpoint
determine_api_port(api_port('keystone-admin'))
File "hooks/charmhelpers/contrib/hahelpers/cluster.py", line 122, in determine_api_port
if len(peer_units()) > 0 or is_clustered():
File "hooks/charmhelpers/contrib/hahelpers/cluster.py", line 59, in peer_units
for r_id in (relation_ids('cluster') or []):
File "hooks/charmhelpers/core/hookenv.py", line 44, in wrapper
res = func(*args, **kwargs)
File "hooks/charmhelpers/core/hookenv.py", line 213, in relation_ids
return json.loads(subprocess.check_output(relid_cmd_line)) or []
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
======================================================================
ERROR: test_add_service_to_keystone_nosubset (unit_tests.test_keystone_utils.TestKeystoneUtils)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/mock.py", line 1210, in patched
return func(*args, **keywargs)
File "/home/jamespage/src/charms/icehouse/keystone/unit_tests/test_keystone_utils.py", line 228, in test_add_service_to_keystone_nosubset
utils.add_service_to_keystone(relation_id=relation_id, remote_unit=remote_unit)
File "hooks/keystone_utils.py", line 608, in add_service_to_keystone
manager = manager.KeystoneManager(endpoint=get_local_endpoint(),
File "hooks/keystone_utils.py", line 272, in get_local_endpoint
determine_api_port(api_port('keystone-admin'))
File "hooks/charmhelpers/contrib/hahelpers/cluster.py", line 122, in determine_api_port
if len(peer_units()) > 0 or is_clustered():
File "hooks/charmhelpers/contrib/hahelpers/cluster.py", line 59, in peer_units
for r_id in (relation_ids('cluster') or []):
File "hooks/charmhelpers/core/hookenv.py", line 44, in wrapper
res = func(*args, **kwargs)
File "hooks/charmhelpers/core/hookenv.py", line 213, in relation_ids
return json.loads(subprocess.check_output(relid_cmd_line)) or []
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
and filter_installed_packages:
======================================================================
FAIL: test_upgrade_charm_leader (unit_tests.test_keystone_hooks.KeystoneRelationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/mock.py", line 1210, in patched
return func(*args, **keywargs)
File "/home/jamespage/src/charms/icehouse/keystone/unit_tests/test_keystone_hooks.py", line 347, in test_upgrade_charm_leader
'pwgen', 'keystone', 'python-psycopg2'])
File "/usr/lib/python2.7/dist-packages/mock.py", line 844, in assert_called_with
raise AssertionError(msg)
AssertionError: Expected call: apt_install(['haproxy', 'unison', 'uuid', 'python-mysqldb', 'pwgen', 'keystone', 'python-psycopg2'])
Actual call: apt_install(['haproxy', 'unison', 'keystone', 'python-psycopg2'])
======================================================================
FAIL: test_upgrade_charm_not_leader (unit_tests.test_keystone_hooks.KeystoneRelationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/mock.py", line 1210, in patched
return func(*args, **keywargs)
File "/home/jamespage/src/charms/icehouse/keystone/unit_tests/test_keystone_hooks.py", line 360, in test_upgrade_charm_not_leader
'pwgen', 'keystone', 'python-psycopg2'])
File "/usr/lib/python2.7/dist-packages/mock.py", line 844, in assert_called_with
raise AssertionError(msg)
AssertionError: Expected call: apt_install(['haproxy', 'unison', 'uuid', 'python-mysqldb', 'pwgen', 'keystone', 'python-psycopg2'])
Actual call: apt_install(['haproxy', 'unison', 'keystone', 'python-psycopg2'])
You need to mock out get_local_endpoint:
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= service_ to_keystone_ clustered_ https_none_ values (unit_tests. test_keystone_ utils.TestKeyst oneUtils) ------- ------- ------- ------- ------- ------- ------- ------- ------- python2. 7/dist- packages/ mock.py" , line 1210, in patched jamespage/ src/charms/ icehouse/ keystone/ unit_tests/ test_keystone_ utils.py" , line 158, in test_add_ service_ to_keystone_ clustered_ https_none_ values add_service_ to_keystone( relation_ id=relation_ id, remote_ unit=remote_ unit) keystone_ utils.py" , line 608, in add_service_ to_keystone KeystoneManager (endpoint= get_local_ endpoint( ), keystone_ utils.py" , line 272, in get_local_endpoint api_port( api_port( 'keystone- admin') ) charmhelpers/ contrib/ hahelpers/ cluster. py", line 122, in determine_api_port charmhelpers/ contrib/ hahelpers/ cluster. py", line 59, in peer_units ids('cluster' ) or []): charmhelpers/ core/hookenv. py", line 44, in wrapper charmhelpers/ core/hookenv. py", line 213, in relation_ids subprocess. check_output( relid_cmd_ line)) or [] python2. 7/subprocess. py", line 566, in check_output python2. 7/subprocess. py", line 710, in __init__ python2. 7/subprocess. py", line 1327, in _execute_child
ERROR: test_add_
-------
Traceback (most recent call last):
File "/usr/lib/
return func(*args, **keywargs)
File "/home/
utils.
File "hooks/
manager = manager.
File "hooks/
determine_
File "hooks/
if len(peer_units()) > 0 or is_clustered():
File "hooks/
for r_id in (relation_
File "hooks/
res = func(*args, **kwargs)
File "hooks/
return json.loads(
File "/usr/lib/
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/
errread, errwrite)
File "/usr/lib/
raise child_exception
OSError: [Errno 2] No such file or directory
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= service_ to_keystone_ no_clustered_ no_https_ complete_ values (unit_tests. test_keystone_ utils.TestKeyst oneUtils) ------- ------- ------- ------- ------- ------- ------- ------- ------- python2. 7/dist- packages/ mock.py" , line 1210, in patched jamespage/ src/charms/ icehouse/ keystone/ unit_tests/ test_keystone_ utils.py" , line 196, in test_add_ service_ to_keystone_ no_clustered_ no_https_ complete_ values add_service_ to_keystone( relation_ id=relation_ id, remote_ unit=remote_ unit) keystone_ utils.py" , line 608, in add_service_ to_keystone KeystoneManager (endpoint= get_local_ endpoint( ), keystone_ utils.py" , line 272, in get_local_endpoint api_port( api_port( 'keystone- admin') ) charmhelpers/ contrib/ hahelpers/ cluster. py", line 122, in determine_api_port charmhelpers/ contrib/ hahelpers/ cluster. py", line 59, in peer_units ids('cluster' ) or []): charmhelpers/ core/hookenv. py", line 44, in wrapper charmhelpers/ core/hookenv. py", line 213, in relation_ids subprocess. check_output( relid_cmd_ line)) or [] python2. 7/subprocess. py", line 566, in check_output python2. 7/subprocess. py", line 710, in __init__ python2. 7/subprocess. py", line 1327, in _execute_child
ERROR: test_add_
-------
Traceback (most recent call last):
File "/usr/lib/
return func(*args, **keywargs)
File "/home/
utils.
File "hooks/
manager = manager.
File "hooks/
determine_
File "hooks/
if len(peer_units()) > 0 or is_clustered():
File "hooks/
for r_id in (relation_
File "hooks/
res = func(*args, **kwargs)
File "hooks/
return json.loads(
File "/usr/lib/
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/
errread, errwrite)
File "/usr/lib/
raise child_exception
OSError: [Errno 2] No such file or directory
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= service_ to_keystone_ nosubset (unit_tests. test_keystone_ utils.TestKeyst oneUtils) ------- ------- ------- ------- ------- ------- ------- ------- ------- python2. 7/dist- packages/ mock.py" , line 1210, in patched jamespage/ src/charms/ icehouse/ keystone/ unit_tests/ test_keystone_ utils.py" , line 228, in test_add_ service_ to_keystone_ nosubset add_service_ to_keystone( relation_ id=relation_ id, remote_ unit=remote_ unit) keystone_ utils.py" , line 608, in add_service_ to_keystone KeystoneManager (endpoint= get_local_ endpoint( ), keystone_ utils.py" , line 272, in get_local_endpoint api_port( api_port( 'keystone- admin') ) charmhelpers/ contrib/ hahelpers/ cluster. py", line 122, in determine_api_port charmhelpers/ contrib/ hahelpers/ cluster. py", line 59, in peer_units ids('cluster' ) or []): charmhelpers/ core/hookenv. py", line 44, in wrapper charmhelpers/ core/hookenv. py", line 213, in relation_ids subprocess. check_output( relid_cmd_ line)) or [] python2. 7/subprocess. py", line 566, in check_output python2. 7/subprocess. py", line 710, in __init__ python2. 7/subprocess. py", line 1327, in _execute_child
ERROR: test_add_
-------
Traceback (most recent call last):
File "/usr/lib/
return func(*args, **keywargs)
File "/home/
utils.
File "hooks/
manager = manager.
File "hooks/
determine_
File "hooks/
if len(peer_units()) > 0 or is_clustered():
File "hooks/
for r_id in (relation_
File "hooks/
res = func(*args, **kwargs)
File "hooks/
return json.loads(
File "/usr/lib/
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/
errread, errwrite)
File "/usr/lib/
raise child_exception
OSError: [Errno 2] No such file or directory
and filter_ installed_ packages:
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= charm_leader (unit_tests. test_keystone_ hooks.KeystoneR elationTests) ------- ------- ------- ------- ------- ------- ------- ------- ------- python2. 7/dist- packages/ mock.py" , line 1210, in patched jamespage/ src/charms/ icehouse/ keystone/ unit_tests/ test_keystone_ hooks.py" , line 347, in test_upgrade_ charm_leader python2. 7/dist- packages/ mock.py" , line 844, in assert_called_with ['haproxy' , 'unison', 'uuid', 'python-mysqldb', 'pwgen', 'keystone', 'python-psycopg2']) ['haproxy' , 'unison', 'keystone', 'python-psycopg2'])
FAIL: test_upgrade_
-------
Traceback (most recent call last):
File "/usr/lib/
return func(*args, **keywargs)
File "/home/
'pwgen', 'keystone', 'python-psycopg2'])
File "/usr/lib/
raise AssertionError(msg)
AssertionError: Expected call: apt_install(
Actual call: apt_install(
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= charm_not_ leader (unit_tests. test_keystone_ hooks.KeystoneR elationTests) ------- ------- ------- ------- ------- ------- ------- ------- ------- python2. 7/dist- packages/ mock.py" , line 1210, in patched jamespage/ src/charms/ icehouse/ keystone/ unit_tests/ test_keystone_ hooks.py" , line 360, in test_upgrade_ charm_not_ leader python2. 7/dist- packages/ mock.py" , line 844, in assert_called_with ['haproxy' , 'unison', 'uuid', 'python-mysqldb', 'pwgen', 'keystone', 'python-psycopg2']) ['haproxy' , 'unison', 'keystone', 'python-psycopg2'])
FAIL: test_upgrade_
-------
Traceback (most recent call last):
File "/usr/lib/
return func(*args, **keywargs)
File "/home/
'pwgen', 'keystone', 'python-psycopg2'])
File "/usr/lib/
raise AssertionError(msg)
AssertionError: Expected call: apt_install(
Actual call: apt_install(