Bugfix: fix unit-source for pre-release of ansible-core 2.20 (devel and milestone branch) (#903) (#909)

SUMMARY
CI fix for #904
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
tests/unit
ADDITIONAL INFORMATION

Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
(cherry picked from commit d4fc22c74e)

Co-authored-by: Yuriy Novostavskiy <yuriy@novostavskiy.kiev.ua>
This commit is contained in:
patchback[bot]
2025-04-25 11:01:13 -04:00
committed by GitHub
parent d2dcb9e55f
commit 92e3f98a20
2 changed files with 6 additions and 6 deletions

View File

@@ -44,8 +44,8 @@ def test_warn_on_k8s_version(monkeypatch, stdin, capfd):
assert return_value.get("warnings") is not None
warnings = return_value["warnings"]
assert len(warnings) == 1
assert "kubernetes" in warnings[0]
assert MINIMAL_K8S_VERSION in warnings[0]
assert "kubernetes" in str(warnings[0])
assert MINIMAL_K8S_VERSION in str(warnings[0])
dependencies = [

View File

@@ -202,8 +202,8 @@ def test_service_create_resource_warnings(
result, warnings = svc.create(Mock(), pod_definition)
assert result == mock_pod_resource_instance.to_dict()
assert warnings[0] == "test warning 1"
assert warnings[1] == "test warning 2"
assert str(warnings[0]) == "test warning 1"
assert str(warnings[1]) == "test warning 2"
def test_service_create_resource_check_mode():
@@ -289,8 +289,8 @@ def test_service_apply_existing_resource_warnings(
)
assert result == mock_pod_resource_instance.to_dict()
assert warnings[0] == "test warning 1"
assert warnings[1] == "test warning 2"
assert str(warnings[0]) == "test warning 1"
assert str(warnings[1]) == "test warning 2"
def test_service_replace_existing_resource(