tests: use assert_equal in more places.

issue510
David Wilson 6 years ago
parent d72567b15b
commit 1b8748a8d9

@ -26,52 +26,52 @@
- assert_equal: - assert_equal:
left: out.result left: out.result
right: [ right: [
{ {
'kwargs': { 'kwargs': {
'check_host_keys': 'ignore', 'check_host_keys': 'ignore',
'connect_timeout': 10, 'connect_timeout': 10,
'hostname': 'alias-host', 'hostname': 'alias-host',
'identities_only': False, 'identities_only': False,
'identity_file': null, 'identity_file': null,
'password': null, 'password': null,
'port': null, 'port': null,
'python_path': null, 'python_path': null,
'ssh_args': [ 'ssh_args': [
'-o', '-o',
'ForwardAgent=yes', 'ForwardAgent=yes',
'-o', '-o',
'ControlMaster=auto', 'ControlMaster=auto',
'-o', '-o',
'ControlPersist=60s', 'ControlPersist=60s',
], ],
'ssh_debug_level': null, 'ssh_debug_level': null,
'ssh_path': 'ssh', 'ssh_path': 'ssh',
'username': 'alias-userx', 'username': 'alias-user',
},
'method': 'ssh',
}, },
{ 'method': 'ssh',
'kwargs': { },
'check_host_keys': 'ignore', {
'connect_timeout': 10, 'kwargs': {
'hostname': 'cd-normal-alias', 'check_host_keys': 'ignore',
'identities_only': False, 'connect_timeout': 10,
'identity_file': null, 'hostname': 'cd-normal-alias',
'password': null, 'identities_only': False,
'port': null, 'identity_file': null,
'python_path': null, 'password': null,
'ssh_args': [ 'port': null,
'-o', 'python_path': null,
'ForwardAgent=yes', 'ssh_args': [
'-o', '-o',
'ControlMaster=auto', 'ForwardAgent=yes',
'-o', '-o',
'ControlPersist=60s', 'ControlMaster=auto',
], '-o',
'ssh_debug_level': null, 'ControlPersist=60s',
'ssh_path': 'ssh', ],
'username': null, 'ssh_debug_level': null,
}, 'ssh_path': 'ssh',
'method': 'ssh', 'username': null,
} },
] 'method': 'ssh',
}
]

@ -1,6 +1,6 @@
# Verify one OSA-style container has the correct config. # Verify one OSA-style container has the correct config.
- name: integration/connection_delegation/container_standalone.yml - name: integration/connection_delegation/osa_container_standalone.yml
hosts: dtc-container-1 hosts: dtc-container-1
gather_facts: false gather_facts: false
tasks: tasks:
@ -10,19 +10,19 @@
- mitogen_get_stack: - mitogen_get_stack:
register: out register: out
- assert: - assert_equal:
that: | left: out.result
out.result == [ right: [
{ {
'kwargs': { 'kwargs': {
'container': 'dtc-container-1', 'container': 'dtc-container-1',
'docker_path': None, 'docker_path': null,
'kind': 'lxc', 'kind': 'lxc',
'lxc_info_path': None, 'lxc_info_path': null,
'machinectl_path': None, 'machinectl_path': null,
'python_path': ['/usr/bin/python'], 'python_path': ['/usr/bin/python'],
'username': None, 'username': null,
}, },
'method': 'setns', 'method': 'setns',
}, },
] ]

@ -13,20 +13,20 @@
delegate_to: "{{target}}" delegate_to: "{{target}}"
register: out register: out
- assert: - assert_equal:
that: | left: out.result
out.result == [ right: [
{ {
'kwargs': { 'kwargs': {
'container': 'osa-container-1', 'container': 'osa-container-1',
'docker_path': None, 'docker_path': null,
'kind': 'lxc', 'kind': 'lxc',
'lxc_info_path': None, 'lxc_info_path': null,
'lxc_path': None, 'lxc_path': null,
'machinectl_path': None, 'machinectl_path': null,
'python_path': None, 'python_path': null,
'username': None, 'username': null,
}, },
'method': 'setns', 'method': 'setns',
}, },
] ]

Loading…
Cancel
Save