Fix tests: Update expected output for IPv4-mapped IPv6 addresses

Resolves: RHEL-183548
This commit is contained in:
Lumir Balhar 2026-07-07 14:13:38 +02:00
parent f0e738ab16
commit efb609af59
2 changed files with 24 additions and 0 deletions

View File

@ -61,6 +61,9 @@ Conflicts: python-psycopg2-zope < %{version}
# Remove test 'test_from_tables' for s390 architecture
# from ./tests/test_types_extras.py
Patch0: test_types_extras-2.9.3-test_from_tables.patch
# Update expected output for IPv4-mapped IPv6 addresses: PostgreSQL 13.20+
# returns dotted-decimal form (::ffff:1.2.3.0) instead of hex (::ffff:102:300)
Patch1: test_ipaddress-ipv4-mapped-ipv6-format.patch
%description
%{desc}
@ -142,6 +145,7 @@ Zope Database Adapter for PostgreSQL, called ZPsycopgDA
%ifarch s390x s390
%patch0 -p0
%endif
%patch1 -p0
%build
export CFLAGS=${RPM_OPT_FLAGS} LDFLAGS=${RPM_LD_FLAGS}

View File

@ -0,0 +1,20 @@
--- tests/test_ipaddress.py.orig 2026-07-07 00:00:00.000000000 +0000
+++ tests/test_ipaddress.py 2026-07-07 00:00:00.000000000 +0000
@@ -68,7 +68,7 @@
self.assertEquals(cur.fetchone()[0], '127.0.0.1/24')
cur.execute("select %s", [ip.ip_interface('::ffff:102:300/128')])
- self.assertEquals(cur.fetchone()[0], '::ffff:102:300/128')
+ self.assertEquals(cur.fetchone()[0], '::ffff:1.2.3.0/128')
@testutils.skip_if_crdb("cidr")
def test_cidr_cast(self):
@@ -109,7 +109,7 @@
self.assertEquals(cur.fetchone()[0], '127.0.0.0/24')
cur.execute("select %s", [ip.ip_network('::ffff:102:300/128')])
- self.assertEquals(cur.fetchone()[0], '::ffff:102:300/128')
+ self.assertEquals(cur.fetchone()[0], '::ffff:1.2.3.0/128')
def test_suite():