Fix test failure on F37
This commit is contained in:
parent
fb70713358
commit
03f3084bfb
@ -15,8 +15,13 @@ Version: 2.12.6
|
||||
Release: 1%{?dist}
|
||||
|
||||
License: GPLv3+
|
||||
Source0: %{pypi_source}
|
||||
Patch0: https://github.com/ansible/ansible/pull/76670.patch#/fix-tests-failing-on-pytest-7.patch
|
||||
Source: %{pypi_source}
|
||||
Patch: https://github.com/ansible/ansible/pull/76670.patch#/fix-tests-failing-on-pytest-7.patch
|
||||
# A 2.10.3 async test uses /usr/bin/python, which we do not have by default.
|
||||
# Patch the test to use /usr/bin/python3 as we have for our build.
|
||||
Patch: 2.10.3-test-patch.patch
|
||||
# Stop using a deprecated cryptography method that is no longer available in F37.
|
||||
Patch: https://github.com/ansible/ansible/pull/77835.patch#/avoid-deprecated-method-unit-tests.patch
|
||||
|
||||
Url: https://ansible.com
|
||||
BuildArch: noarch
|
||||
@ -35,10 +40,6 @@ Conflicts: ansible <= 2.9.99
|
||||
Provides: ansible-base = 2.10.7
|
||||
Obsoletes: ansible-base < 2.10.6-1%{?dist}
|
||||
|
||||
# A 2.10.3 async test uses /usr/bin/python, which we do not have by default.
|
||||
# Patch the test to use /usr/bin/python3 as we have for our build.
|
||||
Patch1: 2.10.3-test-patch.patch
|
||||
|
||||
%if %{with tests}
|
||||
#
|
||||
# For tests
|
||||
|
28
avoid-deprecated-method-unit-tests.patch
Normal file
28
avoid-deprecated-method-unit-tests.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 74d67f5eacf75bf16dedf1090f08fac5059b31f7 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Clay <matt@mystile.com>
|
||||
Date: Tue, 17 May 2022 22:54:53 -0700
|
||||
Subject: [PATCH] [stable-2.12] Avoid deprecated method in unit tests. (cherry
|
||||
picked from commit 5f74350fd5fab5599127eaa43c615d2159e145c6)
|
||||
|
||||
Co-authored-by: Matt Clay <matt@mystile.com>
|
||||
---
|
||||
test/units/ansible_test/ci/util.py | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/test/units/ansible_test/ci/util.py b/test/units/ansible_test/ci/util.py
|
||||
index ba8e358bc8f30f..2273f0ab6b0c3c 100644
|
||||
--- a/test/units/ansible_test/ci/util.py
|
||||
+++ b/test/units/ansible_test/ci/util.py
|
||||
@@ -44,10 +44,8 @@ def verify_signature(request, public_key_pem):
|
||||
|
||||
public_key = load_pem_public_key(public_key_pem.encode(), default_backend())
|
||||
|
||||
- verifier = public_key.verifier(
|
||||
+ public_key.verify(
|
||||
base64.b64decode(signature.encode()),
|
||||
+ payload_bytes,
|
||||
ec.ECDSA(hashes.SHA256()),
|
||||
)
|
||||
-
|
||||
- verifier.update(payload_bytes)
|
||||
- verifier.verify()
|
Loading…
Reference in New Issue
Block a user