summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/hrobot/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/community/hrobot/tests')
-rw-r--r--ansible_collections/community/hrobot/tests/sanity/ignore-2.18.txt1
-rw-r--r--ansible_collections/community/hrobot/tests/sanity/ignore-2.18.txt.license3
-rw-r--r--ansible_collections/community/hrobot/tests/unit/plugins/inventory/test_robot.py20
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)