From 71d91409f8609e5f6a3872d20949ab1d703a725a Mon Sep 17 00:00:00 2001 From: Konstantin Babushkin Date: Sun, 21 Jan 2024 23:20:18 +0100 Subject: [PATCH] fix integration test --- tests/sample/Networking/v2/FloatingIpTest.php | 4 ++-- tests/sample/Networking/v2/TestCase.php | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/sample/Networking/v2/FloatingIpTest.php b/tests/sample/Networking/v2/FloatingIpTest.php index 74084635..196f0edc 100644 --- a/tests/sample/Networking/v2/FloatingIpTest.php +++ b/tests/sample/Networking/v2/FloatingIpTest.php @@ -49,7 +49,7 @@ public function testCreate(): FloatingIpData $data->externalNetwork->waitUntilActive(); $data->internalNetwork->waitUntilActive(); - $data->router = $this->getServiceLayer3()->createRouter([ + $data->router = $this->getService()->createRouter([ 'name' => $this->randomStr(), 'externalGatewayInfo' => [ 'networkId' => $data->externalNetwork->id, @@ -161,7 +161,7 @@ public function testDelete(FloatingIpData $data) '{id}' => $data->floatingIp->id, ]); - foreach ($this->getServiceLayer3()->listFloatingIps() as $floatingIp) { + foreach ($this->getService()->listFloatingIps() as $floatingIp) { if ($floatingIp->id == $data->floatingIp->id) { $this->fail('Floating IP still exists'); } diff --git a/tests/sample/Networking/v2/TestCase.php b/tests/sample/Networking/v2/TestCase.php index 2ac889b3..a78c69d6 100644 --- a/tests/sample/Networking/v2/TestCase.php +++ b/tests/sample/Networking/v2/TestCase.php @@ -13,11 +13,6 @@ protected function getService(): Service return $this->getCachedService(Service::class); } - protected function getServiceLayer3(): \OpenStack\Networking\v2\Extensions\Layer3\Service - { - return $this->getCachedService(\OpenStack\Networking\v2\Extensions\Layer3\Service::class); - } - protected function sampleFile(string $path, array $replacements = []): string { return parent::sampleFile("Networking/v2/$path", $replacements);