From 62f4ebcc377177d0c6bfda837b7841e779666b64 Mon Sep 17 00:00:00 2001 From: Pavlo Yatsukhnenko Date: Mon, 20 Oct 2025 20:34:31 +0300 Subject: [PATCH] Add AUTH command to Relay connection tests (#1601) --- tests/Predis/Connection/RelayConnectionTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Predis/Connection/RelayConnectionTest.php b/tests/Predis/Connection/RelayConnectionTest.php index d423ca38..1e88fbf5 100644 --- a/tests/Predis/Connection/RelayConnectionTest.php +++ b/tests/Predis/Connection/RelayConnectionTest.php @@ -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();