summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-03-18 11:14:17 +0100
committerRemi Collet <remi@remirepo.net>2021-03-18 11:14:17 +0100
commite0cc102064e022687950e9f309aa123e35c1e2f3 (patch)
tree17b438e0ff27aeafe14f7a44d42b3dbd0858fc02
parentaf0530d55e9d69b7aa003fada6efba805b954a8c (diff)
fix test failure with redis 6.2 using patch from
https://github.com/predis/predis/pull/686
-rw-r--r--php-nrk-Predis-redis62.patch36
-rw-r--r--php-nrk-Predis.spec21
2 files changed, 50 insertions, 7 deletions
diff --git a/php-nrk-Predis-redis62.patch b/php-nrk-Predis-redis62.patch
new file mode 100644
index 0000000..a0ad3aa
--- /dev/null
+++ b/php-nrk-Predis-redis62.patch
@@ -0,0 +1,36 @@
+From 2f9337cb9bbebdf7334a7e58a6dc132eca013268 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 18 Mar 2021 11:08:37 +0100
+Subject: [PATCH] fix test expectation for redis 6.2
+
+---
+ tests/Predis/Command/ConnectionSelectTest.php | 2 +-
+ tests/Predis/Command/KeyMoveTest.php | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/Predis/Command/ConnectionSelectTest.php b/tests/Predis/Command/ConnectionSelectTest.php
+index ac44e64bf..f2bcadd0a 100644
+--- a/tests/Predis/Command/ConnectionSelectTest.php
++++ b/tests/Predis/Command/ConnectionSelectTest.php
+@@ -83,7 +83,7 @@ public function testThrowsExceptionOnUnexpectedDatabaseRange()
+ /**
+ * @group connected
+ * @expectedException \Predis\Response\ServerException
+- * @expectedExceptionMessage ERR invalid DB index
++ * @expectedExceptionMessageRegExp /ERR (invalid DB index|value is not)/
+ */
+ public function testThrowsExceptionOnUnexpectedDatabaseName()
+ {
+diff --git a/tests/Predis/Command/KeyMoveTest.php b/tests/Predis/Command/KeyMoveTest.php
+index c47a84ca5..ee16af41a 100644
+--- a/tests/Predis/Command/KeyMoveTest.php
++++ b/tests/Predis/Command/KeyMoveTest.php
+@@ -82,7 +82,7 @@ public function testMovesKeysToDifferentDatabases()
+ /**
+ * @group connected
+ * @expectedException \Predis\Response\ServerException
+- * @expectedExceptionMessage ERR index out of range
++ * @expectedExceptionMessageRegEx /ERR.*out of range/
+ */
+ public function testThrowsExceptionOnInvalidDatabases()
+ {
diff --git a/php-nrk-Predis.spec b/php-nrk-Predis.spec
index 871aab3..294d7f9 100644
--- a/php-nrk-Predis.spec
+++ b/php-nrk-Predis.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-nrk-Predis
#
-# Copyright (c) 2013-2020 Remi Collet
+# Copyright (c) 2013-2021 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -15,7 +15,7 @@
%global gh_owner nrk
%global gh_project predis
-%global gh_commit 8ca99f91e45d49f214abc234ce69149591406bbd
+%global gh_commit 9930e933c67446962997b05201c69c2319bf26de
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global ns_project Predis
@@ -24,8 +24,8 @@
%global pear_channel pear.nrk.io
Name: php-nrk-Predis
-Version: 1.1.5
-Release: 1%{?dist}
+Version: 1.1.6
+Release: 3%{?dist}
Summary: PHP client library for Redis
License: MIT
@@ -40,6 +40,8 @@ BuildRequires: php-phpunit-PHPUnit
BuildRequires: redis
%endif
+Patch0: %{name}-redis62.patch
+
Requires: php(language) >= 5.3.9
Requires: php-reflection
Requires: php-filter
@@ -65,6 +67,7 @@ Flexible and feature-complete PHP client library for Redis.
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1
%build
@@ -97,12 +100,9 @@ redis-server \
sed -e "s/6379/$port/" phpunit.xml.dist > phpunit.xml
sed -e "/expectedExceptionMessageRegExp/s/6379/$port/" -i tests/PHPUnit/PredisConnectionTestCase.php
-# testReturnsCommandInfoOnExistingCommand failing on recent Redis version
-
ret=0
php -d memory_limit=1G %{_bindir}/phpunit \
--include-path=%{buildroot}%{_datadir}/pear \
- --filter '^((?!(testReturnsCommandInfoOnExistingCommand)).)*$' \
--verbose || ret=1
: Cleanup
@@ -135,6 +135,13 @@ fi
%changelog
+* Thu Mar 18 2021 Remi Collet <remi@remirepo.net> - 1.1.6-3
+- fix test failure with redis 6.2 using patch from
+ https://github.com/predis/predis/pull/686
+
+* Sat Sep 12 2020 Remi Collet <remi@remirepo.net> - 1.1.6-1
+- update to 1.1.6
+
* Fri Sep 11 2020 Remi Collet <remi@remirepo.net> - 1.1.5-1
- update to 1.1.5