summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-08-11 00:25:21 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-11 00:25:21 +0000
commit7cce634eea37d7ea25d5c3ae757514333986a8bb (patch)
tree042ca007f11c094c67bfd424282e23e3c6fb89e7 /tests
parent1542b9288c494706c93a710382b42b6975592a5c (diff)
parent4155ef0c478c4eb5513439dabd5553bf389d1803 (diff)
Merge "Fix bug in apex inventory"
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/ansible_library/modules/apex_generate_inventory_test.py10
-rw-r--r--tests/unit/ansible_library/modules/fuel_test.py12
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/unit/ansible_library/modules/apex_generate_inventory_test.py b/tests/unit/ansible_library/modules/apex_generate_inventory_test.py
index 7df9d35c..668a0155 100644
--- a/tests/unit/ansible_library/modules/apex_generate_inventory_test.py
+++ b/tests/unit/ansible_library/modules/apex_generate_inventory_test.py
@@ -23,8 +23,8 @@ def test_generate_inventory(data_root):
u'compute': [u'192.0.2.5', u'192.0.2.6'],
u'control': [u'192.0.2.7', u'192.0.2.8', u'192.0.2.9']}
assert dict(inventory['hosts_meta']) == {
- u'192.0.2.5': {'ansible_ssh_host': u'192.0.2.5'},
- u'192.0.2.6': {'ansible_ssh_host': u'192.0.2.6'},
- u'192.0.2.7': {'ansible_ssh_host': u'192.0.2.7'},
- u'192.0.2.8': {'ansible_ssh_host': u'192.0.2.8'},
- u'192.0.2.9': {'ansible_ssh_host': u'192.0.2.9'}}
+ u'192.0.2.5': {'ansible_ssh_host': u'192.0.2.5', 'ansible_user': 'heat-admin'},
+ u'192.0.2.6': {'ansible_ssh_host': u'192.0.2.6', 'ansible_user': 'heat-admin'},
+ u'192.0.2.7': {'ansible_ssh_host': u'192.0.2.7', 'ansible_user': 'heat-admin'},
+ u'192.0.2.8': {'ansible_ssh_host': u'192.0.2.8', 'ansible_user': 'heat-admin'},
+ u'192.0.2.9': {'ansible_ssh_host': u'192.0.2.9', 'ansible_user': 'heat-admin'}}
diff --git a/tests/unit/ansible_library/modules/fuel_test.py b/tests/unit/ansible_library/modules/fuel_test.py
index e004fc17..9ec1806f 100644
--- a/tests/unit/ansible_library/modules/fuel_test.py
+++ b/tests/unit/ansible_library/modules/fuel_test.py
@@ -34,21 +34,21 @@ def test_generate_inventory(data_root):
u'node-27'],
u'mongo': [u'node-24']}
assert dict(inventory['hosts_meta']) == {
- u'node-23': {'ansible_ssh_host': u'10.20.11.10', 'cluster': 4, 'ip': u'10.20.11.10',
+ u'node-23': {'ansible_ssh_host': u'10.20.11.10', 'ansible_user': 'root', 'cluster': 4, 'ip': u'10.20.11.10',
'mac': u'74:4a:a4:01:71:61', 'name': u'Untitled (71:61)', 'online': True, 'os_platform': u'ubuntu',
'status': u'ready'},
- u'node-24': {'ansible_ssh_host': u'10.20.11.11', 'cluster': 4, 'ip': u'10.20.11.11',
+ u'node-24': {'ansible_ssh_host': u'10.20.11.11', 'ansible_user': 'root', 'cluster': 4, 'ip': u'10.20.11.11',
'mac': u'74:4a:a4:01:73:50', 'name': u'Untitled (73:50)', 'online': True, 'os_platform': u'ubuntu',
'status': u'ready'},
- u'node-25': {'ansible_ssh_host': u'10.20.11.12', 'cluster': 4, 'ip': u'10.20.11.12',
+ u'node-25': {'ansible_ssh_host': u'10.20.11.12', 'ansible_user': 'root', 'cluster': 4, 'ip': u'10.20.11.12',
'mac': u'74:4a:a4:00:d8:76', 'name': u'Untitled (d8:76)', 'online': True, 'os_platform': u'ubuntu',
'status': u'ready'},
- u'node-26': {'ansible_ssh_host': u'10.20.11.15', 'cluster': 4, 'ip': u'10.20.11.15',
+ u'node-26': {'ansible_ssh_host': u'10.20.11.15', 'ansible_user': 'root', 'cluster': 4, 'ip': u'10.20.11.15',
'mac': u'74:4a:a4:01:61:ae', 'name': u'Untitled (61:ae)', 'online': True, 'os_platform': u'ubuntu',
'status': u'ready'},
- u'node-27': {'ansible_ssh_host': u'10.20.11.13', 'cluster': 4, 'ip': u'10.20.11.13',
+ u'node-27': {'ansible_ssh_host': u'10.20.11.13', 'ansible_user': 'root', 'cluster': 4, 'ip': u'10.20.11.13',
'mac': u'74:4a:a4:01:82:c0', 'name': u'Untitled (82:c0)', 'online': True, 'os_platform': u'ubuntu',
'status': u'ready'},
- u'node-28': {'ansible_ssh_host': u'10.20.11.14', 'cluster': 4, 'ip': u'10.20.11.14',
+ u'node-28': {'ansible_ssh_host': u'10.20.11.14', 'ansible_user': 'root', 'cluster': 4, 'ip': u'10.20.11.14',
'mac': u'74:4a:a4:01:74:63', 'name': u'Untitled (74:63)', 'online': True, 'os_platform': u'ubuntu',
'status': u'ready'}}