Added EXPIRETIME command to KeyPrefixProcessor (#1369)

* Added EXPIRETIME command to KeyPrefixProcessor

* Fixed test responses for Redis 7.2

* Marked test as relay-incompatible
This commit is contained in:
Vladyslav Vildanov
2023-08-26 00:27:24 +03:00
committed by GitHub
parent 912af82bfd
commit 16bdd83d23
5 changed files with 24 additions and 2 deletions
@@ -190,6 +190,9 @@ class KeyPrefixProcessor implements ProcessorInterface
/* ---------------- Redis 6.2 ---------------- */
'GETDEL' => $prefixFirst,
/* ---------------- Redis 7.0 ---------------- */
'EXPIRETIME' => $prefixFirst,
/* RedisJSON */
'JSON.ARRAPPEND' => $prefixFirst,
'JSON.ARRINDEX' => $prefixFirst,
+1
View File
@@ -1255,6 +1255,7 @@ class ClientTest extends PredisTestCase
/**
* @group connected
* @group relay-incompatible
* @requiresRedisVersion >= 7.2.0
*/
public function testSetClientInfoOnConnection(): void
@@ -978,6 +978,11 @@ class KeyPrefixProcessorTest extends PredisTestCase
['key'],
['prefix:key'],
],
/* ---------------- Redis 7.0 ---------------- */
['EXPIRETIME',
['key'],
['prefix:key'],
],
];
}
}
+1 -1
View File
@@ -101,7 +101,7 @@ class ACL_Test extends PredisCommandTestCase
$redis->acl->dryRun('Test', 'SET', 'foo', 'bar')
);
$this->assertEquals(
"This user has no permissions to run the 'get' command",
"User Test has no permissions to run the 'get' command",
$redis->acl->dryRun('Test', 'GET', 'foo')
);
}
+14 -1
View File
@@ -82,7 +82,7 @@ class OBJECT_Test extends PredisCommandTestCase
/**
* @group connected
* @requiresRedisVersion >= 2.2.3
* @requiresRedisVersion < 7.2.0
*/
public function testObjectEncoding(): void
{
@@ -92,6 +92,19 @@ class OBJECT_Test extends PredisCommandTestCase
$this->assertMatchesRegularExpression('/[zip|quick]list/', $redis->object('ENCODING', 'list:metavars'));
}
/**
* @group connected
* @requiresRedisVersion >= 7.2.0
*/
public function testObjectEncodingReturnsUpdatedResponse(): void
{
$redis = $this->getClient();
$redis->lpush('list:metavars', 'foo', 'bar');
$this->assertSame('listpack', $redis->object('ENCODING', 'list:metavars'));
}
/**
* @group connected
* @requiresRedisVersion >= 2.2.3