mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-27 15:10:05 -05:00
Skip the view msql tests that expect DROP VIEW on EPAS. (#10660)
EPAS can change a view's columns with CREATE OR REPLACE VIEW, so pgAdmin only drops and re-creates the view on PostgreSQL (#5053). The tests added for #9838 expected DROP VIEW on every server and failed on EPAS.
This commit is contained in:
1 parent
ea17a4e0ff
commit
6d035dc4fa
2 files changed
+11
-2
No files matched your search
+5
@@ -33,6 +33,11 @@ class ViewsGetMsqlTestCase(BaseTestGenerator):
|
||||
# Load test data
|
||||
self.data = self.test_data
|
||||
|
||||
# Check server type
|
||||
if "server_type" in self.data and \
|
||||
self.server['type'] != self.data["server_type"]:
|
||||
self.skipTest(self.data["skip_msg"])
|
||||
|
||||
# Create db connection
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
schema_info = parent_node_dict["schema"][-1]
|
||||
|
||||
+6
-2
@@ -1558,7 +1558,9 @@
|
||||
"query": "\"CREATE OR REPLACE VIEW %s.%s AS SELECT t.id, concat(t.a, ' x ', t.b) AS ab, (t.d)::text AS ds, u.n FROM (VALUES (1, 'a', 'b', now()::date)) t(id, a, b, d) CROSS JOIN (VALUES (2)) u(n); ALTER TABLE %s.%s OWNER TO %s\" % (schema_name, view_name, schema_name, view_name, server['username'])"
|
||||
},
|
||||
"test_data": {
|
||||
"definition": "SELECT t.id, concat(t.a, ' x ', t.b) AS ab, u.n FROM (VALUES (1, 'a', 'b', now()::date)) t(id, a, b, d) CROSS JOIN (VALUES (2)) u(n)"
|
||||
"definition": "SELECT t.id, concat(t.a, ' x ', t.b) AS ab, u.n FROM (VALUES (1, 'a', 'b', now()::date)) t(id, a, b, d) CROSS JOIN (VALUES (2)) u(n)",
|
||||
"server_type": "pg",
|
||||
"skip_msg": "EPAS can change a view's columns without dropping it."
|
||||
},
|
||||
"mocking_required": false,
|
||||
"mock_data": {},
|
||||
@@ -1578,7 +1580,9 @@
|
||||
"query": "\"CREATE OR REPLACE VIEW %s.%s AS SELECT id, valid_from, name FROM (VALUES (1, now()::date, 'a')) t(id, valid_from, name); ALTER TABLE %s.%s OWNER TO %s\" % (schema_name, view_name, schema_name, view_name, server['username'])"
|
||||
},
|
||||
"test_data": {
|
||||
"definition": "SELECT id, valid_from FROM (VALUES (1, now()::date, 'a')) t(id, valid_from, name)"
|
||||
"definition": "SELECT id, valid_from FROM (VALUES (1, now()::date, 'a')) t(id, valid_from, name)",
|
||||
"server_type": "pg",
|
||||
"skip_msg": "EPAS can change a view's columns without dropping it."
|
||||
},
|
||||
"mocking_required": false,
|
||||
"mock_data": {},
|
||||
|
||||
Reference in new issue
Block a user