From 3a96ba78115e45e0ad9a41197d461c566ec092a4 Mon Sep 17 00:00:00 2001 From: Drew Sessler Date: Mon, 2 Oct 2023 22:08:31 +0000 Subject: [PATCH] Create and use a schema in kuttl tests to work around the change to CREATE permissions in public schema in pg15. --- testing/kuttl/e2e/major-upgrade/31--create-data.yaml | 3 ++- .../kuttl/e2e/major-upgrade/36--check-data-and-version.yaml | 4 ++-- testing/kuttl/e2e/wal-pvc-pgupgrade/01--create-data.yaml | 3 ++- .../e2e/wal-pvc-pgupgrade/06--check-data-and-version.yaml | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/testing/kuttl/e2e/major-upgrade/31--create-data.yaml b/testing/kuttl/e2e/major-upgrade/31--create-data.yaml index 9dbaa14fb5..ed8c27b06b 100644 --- a/testing/kuttl/e2e/major-upgrade/31--create-data.yaml +++ b/testing/kuttl/e2e/major-upgrade/31--create-data.yaml @@ -39,7 +39,8 @@ spec: END $$$$; - --command - | - CREATE TABLE important (data) AS VALUES ('treasure'); + CREATE SCHEMA very; + CREATE TABLE very.important (data) AS VALUES ('treasure'); --- apiVersion: batch/v1 kind: Job diff --git a/testing/kuttl/e2e/major-upgrade/36--check-data-and-version.yaml b/testing/kuttl/e2e/major-upgrade/36--check-data-and-version.yaml index 24ea7aa1a1..135f34c7df 100644 --- a/testing/kuttl/e2e/major-upgrade/36--check-data-and-version.yaml +++ b/testing/kuttl/e2e/major-upgrade/36--check-data-and-version.yaml @@ -43,7 +43,7 @@ spec: DECLARE everything jsonb; BEGIN - SELECT jsonb_agg(important) INTO everything FROM important; + SELECT jsonb_agg(important) INTO everything FROM very.important; ASSERT everything = '[{"data":"treasure"}]', format('got %L', everything); END $$$$; --- @@ -103,6 +103,6 @@ spec: DECLARE everything jsonb; BEGIN - SELECT jsonb_agg(important) INTO everything FROM important; + SELECT jsonb_agg(important) INTO everything FROM very.important; ASSERT everything = '[{"data":"treasure"}]', format('got %L', everything); END $$$$; diff --git a/testing/kuttl/e2e/wal-pvc-pgupgrade/01--create-data.yaml b/testing/kuttl/e2e/wal-pvc-pgupgrade/01--create-data.yaml index 2b908e4aa6..ea93bad021 100644 --- a/testing/kuttl/e2e/wal-pvc-pgupgrade/01--create-data.yaml +++ b/testing/kuttl/e2e/wal-pvc-pgupgrade/01--create-data.yaml @@ -39,7 +39,8 @@ spec: END $$$$; - --command - | - CREATE TABLE important (data) AS VALUES ('treasure'); + CREATE SCHEMA very; + CREATE TABLE very.important (data) AS VALUES ('treasure'); --- apiVersion: batch/v1 kind: Job diff --git a/testing/kuttl/e2e/wal-pvc-pgupgrade/06--check-data-and-version.yaml b/testing/kuttl/e2e/wal-pvc-pgupgrade/06--check-data-and-version.yaml index a0ae66f9fe..16afd8d945 100644 --- a/testing/kuttl/e2e/wal-pvc-pgupgrade/06--check-data-and-version.yaml +++ b/testing/kuttl/e2e/wal-pvc-pgupgrade/06--check-data-and-version.yaml @@ -43,7 +43,7 @@ spec: DECLARE everything jsonb; BEGIN - SELECT jsonb_agg(important) INTO everything FROM important; + SELECT jsonb_agg(important) INTO everything FROM very.important; ASSERT everything = '[{"data":"treasure"}]', format('got %L', everything); END $$$$; --- @@ -103,6 +103,6 @@ spec: DECLARE everything jsonb; BEGIN - SELECT jsonb_agg(important) INTO everything FROM important; + SELECT jsonb_agg(important) INTO everything FROM very.important; ASSERT everything = '[{"data":"treasure"}]', format('got %L', everything); END $$$$;