Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -582,14 +582,6 @@
"name": "FKey_$%{}[]()&*^!@\"'`\\/#"
}
},
{
"type": "delete",
"name": "Drop Foreign Key",
"endpoint": "NODE-foreign_key.delete_id",
"data": {
"name": "FKey_$%{}[]()&*^!@\"'`\\/#"
}
},
{
"type": "create",
"name": "Create Foreign Key Constraint that is not enforced",
Expand Down Expand Up @@ -655,19 +647,20 @@
},
{
"type": "delete",
"name": "Drop First Table",
"name": "Drop Second Table",
"endpoint": "NODE-table.delete_id",
"data": {
"name": "test_first_table"
"name": "test_second_table"
}
},
{
"type": "delete",
"name": "Drop Second Table",
"endpoint": "NODE-table.delete_id",
"name": "Drop First Table",
"endpoint": "NODE-table.delete",
"data": {
"name": "test_second_table"
}
"ids": ["<test_first_table>"]
},
"preprocess_data": true
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -269,25 +269,19 @@
}
}, {
"type": "delete",
"name": "Drop Foreign Key",
"endpoint": "NODE-foreign_key.delete_id",
"data": {
"name": "FKey_$%{}[]()&*^!@\"'`\\/#"
}
}, {
"type": "delete",
"name": "Drop First Table",
"name": "Drop Second Table",
"endpoint": "NODE-table.delete_id",
"data": {
"name": "test_first_table"
"name": "test_second_table"
}
}, {
"type": "delete",
"name": "Drop Second Table",
"endpoint": "NODE-table.delete_id",
"name": "Drop First Table",
"endpoint": "NODE-table.delete",
"data": {
"name": "test_second_table"
}
"ids": ["<test_first_table>"]
},
"preprocess_data": true
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -410,14 +410,6 @@
"name": "Idx_$%{}[]()&*^!@\"'`\\/#"
}
},
{
"type": "delete",
"name": "Drop Table",
"endpoint": "NODE-table.delete_id",
"data": {
"name": "test_table_for_indexes"
}
},
{
"type": "create",
"name": "Create unnamed hash index -- 15 Plus",
Expand All @@ -444,6 +436,14 @@
"type": "delete",
"name": "Drop hash index -- 15 Plus",
"endpoint": "NODE-index.delete_id"
},
{
"type": "delete",
"name": "Drop Table",
"endpoint": "NODE-table.delete_id",
"data": {
"name": "test_table_for_indexes"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -413,14 +413,6 @@
"name": "Idx_$%{}[]()&*^!@\"'`\\/#"
}
},
{
"type": "delete",
"name": "Drop Table",
"endpoint": "NODE-table.delete_id",
"data": {
"name": "test_table_for_indexes"
}
},
{
"type": "create",
"name": "Create unnamed hash index -- 13 Plus",
Expand All @@ -447,6 +439,14 @@
"type": "delete",
"name": "Drop hash index -- 13 Plus",
"endpoint": "NODE-index.delete_id"
},
{
"type": "delete",
"name": "Drop Table",
"endpoint": "NODE-table.delete_id",
"data": {
"name": "test_table_for_indexes"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
}
],
"schema": "public"
}
},
"store_object_id": true
},
{
"type": "create",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
}
],
"schema": "public"
}
},
"store_object_id": true
},
{
"type": "create",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
}
],
"schema": "public"
}
},
"store_object_id": true
},
{
"type": "create",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
}
],
"schema": "public"
}
},
"store_object_id": true
},
{
"type": "create",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
}
],
"schema": "public"
}
},
"store_object_id": true
},
{
"type": "create",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
}
],
"schema": "public"
}
},
"store_object_id": true
},
{
"type": "create",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
}
],
"schema": "public"
}
},
"store_object_id": true
},
{
"type": "create",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
}
],
"schema": "public"
}
},
"store_object_id": true
},
{
"type": "create",
Expand Down
19 changes: 16 additions & 3 deletions web/regression/re_sql/tests/test_resql.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ def execute_test_case(self, scenarios):
:return:
"""
object_id = None
# Each test file starts in the default test schema; a create
# scenario that names a schema switches to it (see
# check_schema_precondition).
self.schema_id = self.server_information['schema_id']

for scenario in scenarios:
skip_test_case = True
Expand Down Expand Up @@ -362,6 +366,14 @@ def execute_test_case(self, scenarios):
follow_redirects=True)
try:
self.assertEqual(delete_response.status_code, 200)
# pgAdmin reports some failures, such as the
# object not being found, as an HTTP 200 with
# success set to 0.
delete_data = json.loads(
delete_response.data.decode('utf8'))
self.assertNotEqual(
delete_data.get('success'), 0,
delete_data.get('errormsg'))
except Exception as e:
self.final_test_status = False
print(scenario['name'] + "... FAIL")
Expand Down Expand Up @@ -638,7 +650,10 @@ def execute_prepost_sql(self, sql, use_test_config_db_conn):
def check_schema_precondition(self, scenario):
"""
This function will check the given schema is exist or not. If exist
then fetch the oid and if not then create it.
then fetch the oid and if not then create it. A create scenario
without a schema (a child object such as a constraint) keeps the
schema id of the previous one, so later steps still target the
schema its parent was created in.

:param scenario:
:return:
Expand All @@ -662,8 +677,6 @@ def check_schema_precondition(self, scenario):
self.connection,
scenario['data']['schema'])
self.schema_id = schema[0]
else:
self.schema_id = self.server_information['schema_id']

if 'data' in scenario and 'schema_id' in scenario['data'] and \
scenario['data']['schema_id'] == \
Expand Down
Loading