Skip to content

Commit

Permalink
Create and use a schema in kuttl tests to work around the change to C…
Browse files Browse the repository at this point in the history
…REATE permissions in public schema in pg15.
  • Loading branch information
dsessler7 committed Oct 3, 2023
1 parent cb22a48 commit 3a96ba7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion testing/kuttl/e2e/major-upgrade/31--create-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 $$$$;
---
Expand Down Expand Up @@ -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 $$$$;
3 changes: 2 additions & 1 deletion testing/kuttl/e2e/wal-pvc-pgupgrade/01--create-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 $$$$;
---
Expand Down Expand Up @@ -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 $$$$;

0 comments on commit 3a96ba7

Please sign in to comment.