From 1b8748a8d93bcecd51cd8ed14726696e311fcdc8 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Mon, 21 Jan 2019 20:35:08 +0000 Subject: [PATCH] tests: use assert_equal in more places. --- .../delegate_to_template.yml | 96 +++++++++---------- .../osa_container_standalone.yml | 34 +++---- .../osa_delegate_to_self.yml | 34 +++---- 3 files changed, 82 insertions(+), 82 deletions(-) diff --git a/tests/ansible/integration/connection_delegation/delegate_to_template.yml b/tests/ansible/integration/connection_delegation/delegate_to_template.yml index 384de6f3..b6b33355 100644 --- a/tests/ansible/integration/connection_delegation/delegate_to_template.yml +++ b/tests/ansible/integration/connection_delegation/delegate_to_template.yml @@ -26,52 +26,52 @@ - assert_equal: left: out.result right: [ - { - 'kwargs': { - 'check_host_keys': 'ignore', - 'connect_timeout': 10, - 'hostname': 'alias-host', - 'identities_only': False, - 'identity_file': null, - 'password': null, - 'port': null, - 'python_path': null, - 'ssh_args': [ - '-o', - 'ForwardAgent=yes', - '-o', - 'ControlMaster=auto', - '-o', - 'ControlPersist=60s', - ], - 'ssh_debug_level': null, - 'ssh_path': 'ssh', - 'username': 'alias-userx', - }, - 'method': 'ssh', + { + 'kwargs': { + 'check_host_keys': 'ignore', + 'connect_timeout': 10, + 'hostname': 'alias-host', + 'identities_only': False, + 'identity_file': null, + 'password': null, + 'port': null, + 'python_path': null, + 'ssh_args': [ + '-o', + 'ForwardAgent=yes', + '-o', + 'ControlMaster=auto', + '-o', + 'ControlPersist=60s', + ], + 'ssh_debug_level': null, + 'ssh_path': 'ssh', + 'username': 'alias-user', }, - { - 'kwargs': { - 'check_host_keys': 'ignore', - 'connect_timeout': 10, - 'hostname': 'cd-normal-alias', - 'identities_only': False, - 'identity_file': null, - 'password': null, - 'port': null, - 'python_path': null, - 'ssh_args': [ - '-o', - 'ForwardAgent=yes', - '-o', - 'ControlMaster=auto', - '-o', - 'ControlPersist=60s', - ], - 'ssh_debug_level': null, - 'ssh_path': 'ssh', - 'username': null, - }, - 'method': 'ssh', - } - ] + 'method': 'ssh', + }, + { + 'kwargs': { + 'check_host_keys': 'ignore', + 'connect_timeout': 10, + 'hostname': 'cd-normal-alias', + 'identities_only': False, + 'identity_file': null, + 'password': null, + 'port': null, + 'python_path': null, + 'ssh_args': [ + '-o', + 'ForwardAgent=yes', + '-o', + 'ControlMaster=auto', + '-o', + 'ControlPersist=60s', + ], + 'ssh_debug_level': null, + 'ssh_path': 'ssh', + 'username': null, + }, + 'method': 'ssh', + } + ] diff --git a/tests/ansible/integration/connection_delegation/osa_container_standalone.yml b/tests/ansible/integration/connection_delegation/osa_container_standalone.yml index 5c3699ae..d6483bd6 100644 --- a/tests/ansible/integration/connection_delegation/osa_container_standalone.yml +++ b/tests/ansible/integration/connection_delegation/osa_container_standalone.yml @@ -1,6 +1,6 @@ # 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 gather_facts: false tasks: @@ -10,19 +10,19 @@ - mitogen_get_stack: register: out - - assert: - that: | - out.result == [ - { - 'kwargs': { - 'container': 'dtc-container-1', - 'docker_path': None, - 'kind': 'lxc', - 'lxc_info_path': None, - 'machinectl_path': None, - 'python_path': ['/usr/bin/python'], - 'username': None, - }, - 'method': 'setns', - }, - ] + - assert_equal: + left: out.result + right: [ + { + 'kwargs': { + 'container': 'dtc-container-1', + 'docker_path': null, + 'kind': 'lxc', + 'lxc_info_path': null, + 'machinectl_path': null, + 'python_path': ['/usr/bin/python'], + 'username': null, + }, + 'method': 'setns', + }, + ] diff --git a/tests/ansible/integration/connection_delegation/osa_delegate_to_self.yml b/tests/ansible/integration/connection_delegation/osa_delegate_to_self.yml index 0c6a62c9..d8d25f9f 100644 --- a/tests/ansible/integration/connection_delegation/osa_delegate_to_self.yml +++ b/tests/ansible/integration/connection_delegation/osa_delegate_to_self.yml @@ -13,20 +13,20 @@ delegate_to: "{{target}}" register: out - - assert: - that: | - out.result == [ - { - 'kwargs': { - 'container': 'osa-container-1', - 'docker_path': None, - 'kind': 'lxc', - 'lxc_info_path': None, - 'lxc_path': None, - 'machinectl_path': None, - 'python_path': None, - 'username': None, - }, - 'method': 'setns', - }, - ] + - assert_equal: + left: out.result + right: [ + { + 'kwargs': { + 'container': 'osa-container-1', + 'docker_path': null, + 'kind': 'lxc', + 'lxc_info_path': null, + 'lxc_path': null, + 'machinectl_path': null, + 'python_path': null, + 'username': null, + }, + 'method': 'setns', + }, + ]