From 1f7178e3135daa1678bef856aa6e11aca3fb9996 Mon Sep 17 00:00:00 2001 From: Sergei Shitikov Date: Sun, 16 Feb 2025 15:45:28 +0100 Subject: [PATCH] try to fix testShouldReturnFirstMappedPort in ci --- tests/Integration/GenericContainerTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Integration/GenericContainerTest.php b/tests/Integration/GenericContainerTest.php index 88977cf..79ca358 100644 --- a/tests/Integration/GenericContainerTest.php +++ b/tests/Integration/GenericContainerTest.php @@ -114,14 +114,14 @@ class GenericContainerTest extends TestCase public function testShouldReturnFirstMappedPort(): void { - $container = (new GenericContainer('cristianrgreco/testcontainer:1.1.14')) - ->withPortGenerator(new FixedPortGenerator([8080])) - ->withExposedPorts(8080) - ->withWait(new WaitForHostPort(8080)) + $container = (new GenericContainer('nginx')) + ->withPortGenerator(new FixedPortGenerator([9090])) + ->withExposedPorts(80) + ->withWait(new WaitForHostPort(9090)) ->start(); $firstMappedPort = $container->getFirstMappedPort(); - self::assertSame($firstMappedPort, 8080, 'First mapped port does not match 8080'); + self::assertSame($firstMappedPort, 9090, 'First mapped port does not match 9090'); $container->stop(); }