From 47b81fc6f463175fa63ca62ef39f86ed92bdd2d4 Mon Sep 17 00:00:00 2001 From: pavel-zotov Date: Wed, 7 Aug 2024 01:31:43 +0300 Subject: [PATCH] Added/Updated tests\functional\gtcs\test_ref_integ_inactive_pk_index.py: Splitted expected* text because system triggers now are created in C++/GDML code --- .../gtcs/test_ref_integ_inactive_pk_index.py | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/tests/functional/gtcs/test_ref_integ_inactive_pk_index.py b/tests/functional/gtcs/test_ref_integ_inactive_pk_index.py index 5370494d..de76cb43 100644 --- a/tests/functional/gtcs/test_ref_integ_inactive_pk_index.py +++ b/tests/functional/gtcs/test_ref_integ_inactive_pk_index.py @@ -7,6 +7,12 @@ DESCRIPTION: Original test see in: https://github.com/FirebirdSQL/fbtcs/blob/master/GTCS/tests/REF_INT.7.ISQL.script FBTEST: functional.gtcs.ref_integ_inactive_pk_index +NOTES: + [07.08.2024] pzotov + Splitted expected* text because system triggers now are created in C++/GDML code + See https://github.com/FirebirdSQL/firebird/pull/8202 + Commit (05-aug-2024 13:45): + https://github.com/FirebirdSQL/firebird/commit/0cc8de396a3c2bbe13b161ecbfffa8055e7b4929 """ import os @@ -17,7 +23,11 @@ db = db_factory() act = python_act('db') -test_expected_stderr = """ +test_expected_stdout = """ + Records affected: 1 +""" + +expected_stderr_5x = """ Statement failed, SQLSTATE = 27000 unsuccessful metadata update -ALTER INDEX DEPT_KEY failed @@ -28,9 +38,15 @@ test_expected_stderr = """ violation of PRIMARY or UNIQUE KEY constraint "DEPT_KEY" on table "DEPARTMENT" -Problematic key value is ("DEPT_NO" = 1) """ +expected_stderr_6x = """ + Statement failed, SQLSTATE = 42000 + unsuccessful metadata update + -ALTER INDEX DEPT_KEY failed + -Cannot deactivate index used by an integrity constraint -test_expected_stdout = """ - Records affected: 1 + Statement failed, SQLSTATE = 23000 + violation of PRIMARY or UNIQUE KEY constraint "DEPT_KEY" on table "DEPARTMENT" + -Problematic key value is ("DEPT_NO" = 1) """ @pytest.mark.version('>=3.0') @@ -55,7 +71,7 @@ def test_1(act: Action): ''' act.expected_stdout = test_expected_stdout - act.expected_stderr = test_expected_stderr + act.expected_stderr = expected_stderr_5x if act.is_version('<6') else expected_stderr_6x act.isql(switches=['-q'], input = os.linesep.join( (sql_init, sql_addi) ) )