diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 04:06:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 04:06:02 +0000 |
commit | e3eb94c23206603103f3c4faec6c227f59a1544c (patch) | |
tree | f2639459807ba88f55fc9c54d745bd7075d7f15c /ansible_collections/community/hrobot/tests | |
parent | Releasing progress-linux version 9.4.0+dfsg-1~progress7.99u1. (diff) | |
download | ansible-e3eb94c23206603103f3c4faec6c227f59a1544c.tar.xz ansible-e3eb94c23206603103f3c4faec6c227f59a1544c.zip |
Merging upstream version 9.5.1+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/community/hrobot/tests')
3 files changed, 14 insertions, 10 deletions
diff --git a/ansible_collections/community/hrobot/tests/sanity/ignore-2.18.txt b/ansible_collections/community/hrobot/tests/sanity/ignore-2.18.txt new file mode 100644 index 000000000..0d9329fad --- /dev/null +++ b/ansible_collections/community/hrobot/tests/sanity/ignore-2.18.txt @@ -0,0 +1 @@ +tests/ee/roles/smoke/library/smoke_ipaddress.py shebang diff --git a/ansible_collections/community/hrobot/tests/sanity/ignore-2.18.txt.license b/ansible_collections/community/hrobot/tests/sanity/ignore-2.18.txt.license new file mode 100644 index 000000000..edff8c768 --- /dev/null +++ b/ansible_collections/community/hrobot/tests/sanity/ignore-2.18.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/ansible_collections/community/hrobot/tests/unit/plugins/inventory/test_robot.py b/ansible_collections/community/hrobot/tests/unit/plugins/inventory/test_robot.py index d5514aee5..c10524f7e 100644 --- a/ansible_collections/community/hrobot/tests/unit/plugins/inventory/test_robot.py +++ b/ansible_collections/community/hrobot/tests/unit/plugins/inventory/test_robot.py @@ -368,14 +368,14 @@ def test_unsafe(inventory, mocker): .result_json([ { 'server': { - 'server_ip': '1.2.3.4', + 'server_ip': '1.2.{3.4', 'dc': 'abc', }, }, { 'server': { 'server_ip': '1.2.3.5', - 'server_name': 'foo', + 'server_name': 'fo{o', 'dc': 'EVALU{{ "" }}ATED', }, }, @@ -389,27 +389,27 @@ def test_unsafe(inventory, mocker): open_url.assert_is_done() - host_1 = inventory.inventory.get_host('1.2.3.4') - host_2 = inventory.inventory.get_host('foo') + host_1 = inventory.inventory.get_host('1.2.{3.4') + host_2 = inventory.inventory.get_host('fo{o') host_1_vars = host_1.get_vars() host_2_vars = host_2.get_vars() - assert host_1_vars['ansible_host'] == '1.2.3.4' - assert host_1_vars['hrobot_server_ip'] == '1.2.3.4' + assert host_1_vars['ansible_host'] == '1.2.{3.4' + assert host_1_vars['hrobot_server_ip'] == '1.2.{3.4' assert host_1_vars['hrobot_dc'] == 'abc' assert host_2_vars['ansible_host'] == '1.2.3.5' assert host_2_vars['hrobot_server_ip'] == '1.2.3.5' - assert host_2_vars['hrobot_server_name'] == 'foo' + assert host_2_vars['hrobot_server_name'] == 'fo{o' assert host_2_vars['hrobot_dc'] == 'EVALU{{ "" }}ATED' # Make sure everything is unsafe assert isinstance(host_1_vars['ansible_host'], AnsibleUnsafe) assert isinstance(host_1_vars['hrobot_server_ip'], AnsibleUnsafe) - assert isinstance(host_1_vars['hrobot_dc'], AnsibleUnsafe) + assert not isinstance(host_1_vars['hrobot_dc'], AnsibleUnsafe) - assert isinstance(host_2_vars['ansible_host'], AnsibleUnsafe) - assert isinstance(host_2_vars['hrobot_server_ip'], AnsibleUnsafe) + assert not isinstance(host_2_vars['ansible_host'], AnsibleUnsafe) + assert not isinstance(host_2_vars['hrobot_server_ip'], AnsibleUnsafe) assert isinstance(host_2_vars['hrobot_server_name'], AnsibleUnsafe) assert isinstance(host_2_vars['hrobot_dc'], AnsibleUnsafe) |