From 7945e6e1247433ccb867ff6af353f9b2f2e86eaa Mon Sep 17 00:00:00 2001 From: Julius Kiekbusch Date: Tue, 3 Sep 2024 14:08:31 +0200 Subject: [PATCH] Skip Tests --- tests/Integration/Database/Postgres/FulltextTest.php | 4 ++++ .../Database/Postgres/PostgresSchemaBuilderTest.php | 4 ++++ tests/Integration/Database/SchemaBuilderTest.php | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/tests/Integration/Database/Postgres/FulltextTest.php b/tests/Integration/Database/Postgres/FulltextTest.php index 7c8911f6c2b6..e174ab093eda 100644 --- a/tests/Integration/Database/Postgres/FulltextTest.php +++ b/tests/Integration/Database/Postgres/FulltextTest.php @@ -52,6 +52,10 @@ public function testWhereFulltext() public function testWhereFulltextWithWebsearch() { + if (version_compare($this->getConnection()->getServerVersion(), '11.0', '<')) { + $this->markTestSkipped('Test requires a PostgreSQL connection >= 11.0'); + } + $articles = DB::table('articles')->whereFulltext(['title', 'body'], '+PostgreSQL -YourSQL', ['mode' => 'websearch'])->get(); $this->assertCount(5, $articles); diff --git a/tests/Integration/Database/Postgres/PostgresSchemaBuilderTest.php b/tests/Integration/Database/Postgres/PostgresSchemaBuilderTest.php index 48f2a0e74d71..58dc1b047109 100644 --- a/tests/Integration/Database/Postgres/PostgresSchemaBuilderTest.php +++ b/tests/Integration/Database/Postgres/PostgresSchemaBuilderTest.php @@ -167,6 +167,10 @@ public function testGetViews() public function testDropPartitionedTables() { + if (version_compare($this->getConnection()->getServerVersion(), '11.0', '<')) { + $this->markTestSkipped('Test requires a PostgreSQL connection >= 11.0'); + } + DB::statement('create table groups (id bigserial, tenant_id bigint, name varchar, primary key (id, tenant_id)) partition by hash (tenant_id)'); DB::statement('create table groups_1 partition of groups for values with (modulus 2, remainder 0)'); DB::statement('create table groups_2 partition of groups for values with (modulus 2, remainder 1)'); diff --git a/tests/Integration/Database/SchemaBuilderTest.php b/tests/Integration/Database/SchemaBuilderTest.php index b0c1f67f3c9a..5ec53d557c24 100644 --- a/tests/Integration/Database/SchemaBuilderTest.php +++ b/tests/Integration/Database/SchemaBuilderTest.php @@ -669,6 +669,10 @@ public function testModifyingStoredColumnOnSqlite() public function testGettingGeneratedColumns() { + if ($this->driver === 'pgsql' && version_compare($this->getConnection()->getServerVersion(), '12.0', '<')) { + $this->markTestSkipped('Test requires a PostgreSQL connection >= 12.0'); + } + Schema::create('test', function (Blueprint $table) { $table->integer('price');