Add AUTH command to Relay connection tests (#1601)

This commit is contained in:
Pavlo Yatsukhnenko
2025-10-20 20:34:31 +03:00
committed by GitHub
parent f26a13c8f4
commit 62f4ebcc37
@@ -472,7 +472,9 @@ class RelayConnectionTest extends PredisTestCase
*/
public function testExecutesCommand(): void
{
$connection = new RelayConnection(new Parameters(), new Relay());
$parameters = $this->getParameters();
$connection = new RelayConnection($parameters, new Relay());
$connection->executeCommand(new RawCommand('AUTH', [$parameters->password]));
$this->assertEquals(
'OK',
@@ -491,7 +493,9 @@ class RelayConnectionTest extends PredisTestCase
*/
public function testConnectWithOnConnectionCommands(): void
{
$connection = new RelayConnection(new Parameters(), new Relay());
$parameters = $this->getParameters();
$connection = new RelayConnection($parameters, new Relay());
$connection->addConnectCommand(new RawCommand('AUTH', [$parameters->password]));
$connection->addConnectCommand(new RawCommand('CLIENT', ['SETNAME', 'predis']));
$connection->connect();