mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Added/Updated functional\gtcs\test_ref_integ_drop_pk_index.py: checked on 4.0.1.2692, 3.0.8.33535
This commit is contained in:
parent
914704b924
commit
ed35a8261f
@ -9,6 +9,7 @@ DESCRIPTION:
|
||||
FBTEST: functional.gtcs.ref_integ_drop_pk_index
|
||||
"""
|
||||
|
||||
import os
|
||||
import pytest
|
||||
from firebird.qa import *
|
||||
|
||||
@ -16,7 +17,7 @@ db = db_factory()
|
||||
|
||||
act = python_act('db')
|
||||
|
||||
expected_stderr = """
|
||||
test_expected_stderr = """
|
||||
Statement failed, SQLSTATE = 27000
|
||||
unsuccessful metadata update
|
||||
-DROP INDEX DEPT_KEY failed
|
||||
@ -25,17 +26,32 @@ expected_stderr = """
|
||||
|
||||
Statement failed, SQLSTATE = 23000
|
||||
violation of PRIMARY or UNIQUE KEY constraint "DEPT_KEY" on table "DEPARTMENT"
|
||||
-Problematic key value is ("DEPT_NO" = '1')
|
||||
-Problematic key value is ("DEPT_NO" = 1)
|
||||
"""
|
||||
|
||||
expected_stdout = """
|
||||
test_expected_stdout = """
|
||||
Records affected: 0
|
||||
"""
|
||||
|
||||
@pytest.mark.skip('FIXME: Not IMPLEMENTED')
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act: Action):
|
||||
pytest.fail("Not IMPLEMENTED")
|
||||
|
||||
sql_init = (act.files_dir / 'gtcs-ref-integ-init.sql').read_text()
|
||||
sql_addi = '''
|
||||
drop index dept_key;
|
||||
-- Check that PK index still in use: following must FAIL:
|
||||
set count on;
|
||||
insert into department( dept_no, dept_name) values (1, 'k1');
|
||||
'''
|
||||
|
||||
act.expected_stdout = test_expected_stdout
|
||||
act.expected_stderr = test_expected_stderr
|
||||
|
||||
act.isql(switches=['-q'], input = os.linesep.join( (sql_init, sql_addi) ) )
|
||||
|
||||
assert (act.clean_stdout == act.clean_expected_stdout and
|
||||
act.clean_stderr == act.clean_expected_stderr)
|
||||
|
||||
|
||||
# test_script_1
|
||||
#---
|
||||
|
Loading…
Reference in New Issue
Block a user