Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: fix db tests (#5473)

Oleg Isonend15c8702daaa
diff --git a/.prettierignore b/.prettierignore
index 1b1f2d82c8..7a55f3b6c9 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,3 +1,4 @@
pnpm-lock.yaml
packages/prisma-client/prisma/migrations/*/client
packages/prisma-client/**/*.d.ts
+packages/postgrest/supabase/tests/*.sql
diff --git a/packages/postgrest/supabase/tests/latest-builds-domains.sql b/packages/postgrest/supabase/tests/latest-builds-domains.sql
index 69782d0349..59d71fe3a4 100644
--- a/packages/postgrest/supabase/tests/latest-builds-domains.sql
+++ b/packages/postgrest/supabase/tests/latest-builds-domains.sql
@@ -137,7 +137,7 @@ ORDER BY
SELECT
results_eq(
'SELECT * FROM "public"."TestProjectDomains" WHERE "projectId" = ''project1''',
- $ $
+ $$
SELECT
*
FROM
@@ -147,7 +147,7 @@ SELECT
('project1', 'project-1-custom-domain-2', NULL)
) AS expected(projectId, domainId, buildId)
ORDER BY
- domainId $ $,
+ domainId $$,
'Initial state without builds'
);
@@ -179,7 +179,7 @@ VALUES
SELECT
results_eq(
'SELECT * FROM "public"."TestProjectDomains" WHERE "projectId" = ''project1''',
- $ $
+ $$
SELECT
*
FROM
@@ -193,7 +193,7 @@ SELECT
('project1', 'project-1-custom-domain-2', NULL)
) AS expected(projectId, domainId, buildId)
ORDER BY
- domainId $ $,
+ domainId $$,
'After inserting build1 associated with custom domain 1'
);
@@ -225,7 +225,7 @@ VALUES
SELECT
results_eq(
'SELECT * FROM "public"."TestProjectDomains" WHERE "projectId" = ''project1''',
- $ $
+ $$
SELECT
*
FROM
@@ -239,7 +239,7 @@ SELECT
('project1', 'project-1-custom-domain-2', NULL)
) AS expected(projectId, domainId, buildId)
ORDER BY
- domainId $ $,
+ domainId $$,
'After inserting build2 associated with custom domain 1'
);
@@ -271,7 +271,7 @@ VALUES
SELECT
results_eq(
'SELECT * FROM "public"."TestProjectDomains" WHERE "projectId" = ''project1''',
- $ $
+ $$
SELECT
*
FROM
@@ -289,7 +289,7 @@ SELECT
)
) AS expected(projectId, domainId, buildId)
ORDER BY
- domainId $ $,
+ domainId $$,
'After inserting build3 associated with custom domain 2'
);
@@ -321,7 +321,7 @@ VALUES
SELECT
results_eq(
'SELECT * FROM "public"."TestProjectDomains" WHERE "projectId" = ''project1''',
- $ $
+ $$
SELECT
*
FROM
@@ -339,7 +339,7 @@ SELECT
)
) AS expected(projectId, domainId, buildId)
ORDER BY
- domainId $ $,
+ domainId $$,
'After inserting build4 associated with both domains'
);
@@ -399,7 +399,7 @@ VALUES
SELECT
results_eq(
'SELECT * FROM "public"."TestProjectDomains" WHERE "projectId" = ''project1''',
- $ $
+ $$
SELECT
*
FROM
@@ -417,7 +417,7 @@ SELECT
)
) AS expected(projectId, domainId, buildId)
ORDER BY
- domainId $ $,
+ domainId $$,
'Verify Project1 results remain unchanged after Project2 updates'
);
@@ -426,14 +426,14 @@ SELECT
--------------------------------------------------------------------------------
SELECT
results_eq(
- $ $
+ $$
SELECT
*
FROM
"public"."TestProjectDomains"
WHERE
- "projectId" = 'project2' $ $,
- $ $
+ "projectId" = 'project2' $$,
+ $$
SELECT
*
FROM
@@ -451,7 +451,7 @@ SELECT
)
) AS expected(projectId, domainId, buildId)
ORDER BY
- domainId $ $,
+ domainId $$,
'Verify Project2 results reflect the latest build'
);
diff --git a/packages/postgrest/supabase/tests/latest-builds-projects.sql b/packages/postgrest/supabase/tests/latest-builds-projects.sql
index 830913eccf..477acded53 100644
--- a/packages/postgrest/supabase/tests/latest-builds-projects.sql
+++ b/packages/postgrest/supabase/tests/latest-builds-projects.sql
@@ -782,14 +782,14 @@ SELECT
-- Verify column names match expected structure
SELECT
bag_eq(
- $ $
+ $$
SELECT
column_name :: text
FROM
information_schema.columns
WHERE
- table_name = 'latestBuildVirtual' $ $,
- $ $
+ table_name = 'latestBuildVirtual' $$,
+ $$
VALUES
('buildId'),
('projectId'),
@@ -797,7 +797,7 @@ SELECT
('domain'),
('createdAt'),
('publishStatus'),
- ('updatedAt') $ $,
+ ('updatedAt') $$,
'Test Case 10.1: All expected columns should be present in latestBuildVirtual table.'
);