Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruchip16 authored Jan 7, 2025
2 parents 10f0587 + dda46ee commit 3d239d0
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
- id: update-docs

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: debug-statements
Expand Down Expand Up @@ -36,7 +36,7 @@ repos:
args: ["--filter-files"]

- repo: https://github.com/psf/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black

Expand Down
3 changes: 3 additions & 0 deletions changelogs/fragments/test_ansibleundefined.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
trivial:
- Fixes test cases where there were assertion failure due to AnsibleUndefined path being changed.
2 changes: 1 addition & 1 deletion plugins/sub_plugins/validate/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
__metaclass__ = type

DOCUMENTATION = """
author: Nathaniel Case (@Qalthos)
author: Katherine Case (@Qalthos)
name: config
short_description: Define configurable options for configuration validate plugin
description:
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/plugins/filter/test_ipaddr.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def test_ipaddr_undefined_value(self):
args = ["", AnsibleUndefined(name="my_ip"), ""]
with pytest.raises(
AnsibleFilterError,
match="Unrecognized type <<class 'ansible.template.AnsibleUndefined'>> for ipaddr filter <value>",
# Note: this class has been moved to native_helpers dir since 2.16, hence adding regex to be backwards compatable with 2.15
match=r"Unrecognized type <<class 'ansible\.template\.(native_helpers\.)?AnsibleUndefined'>> for ipaddr filter <value>",
):
_ipaddr(*args)

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/plugins/filter/test_ipv4.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def test_ipv4_undefined_value(self):
args = ["", AnsibleUndefined(name="my_ip"), ""]
with pytest.raises(
AnsibleFilterError,
match="Unrecognized type <<class 'ansible.template.AnsibleUndefined'>> for ipv4 filter <value>",
# Note: this class has been moved to native_helpers dir since 2.16, hence adding regex to be backwards compatable with 2.15
match=r"Unrecognized type <<class 'ansible\.template\.(native_helpers\.)?AnsibleUndefined'>> for ipv4 filter <value>",
):
_ipv4(*args)

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/plugins/filter/test_ipv6.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def test_ipv6_undefined_value(self):
args = ["", AnsibleUndefined(name="my_ip"), ""]
with pytest.raises(
AnsibleFilterError,
match="Unrecognized type <<class 'ansible.template.AnsibleUndefined'>> for ipv6 filter <value>",
# Note: this class has been moved to native_helpers dir since 2.16, hence adding regex to be backwards compatable with 2.15
match=r"Unrecognized type <<class 'ansible\.template\.(native_helpers\.)?AnsibleUndefined'>> for ipv6 filter <value>",
):
_ipv6(*args)

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/plugins/filter/test_ipwrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def test_ipwrap_undefined_value(self):
args = ["", AnsibleUndefined(name="my_ip"), ""]
with pytest.raises(
AnsibleFilterError,
match="Unrecognized type <<class 'ansible.template.AnsibleUndefined'>> for ipwrap filter <value>",
# Note: this class has been moved to native_helpers dir since 2.16, hence adding regex to be backwards compatable with 2.15
match=r"Unrecognized type <<class 'ansible\.template\.(native_helpers\.)?AnsibleUndefined'>> for ipwrap filter <value>",
):
_ipwrap(*args)

Expand Down

0 comments on commit 3d239d0

Please sign in to comment.