6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00
firebird-qa/tests/bugs/core_6083_test.py

57 lines
1.5 KiB
Python
Raw Permalink Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-26 21:10:46 +01:00
"""
ID: issue-6333
ISSUE: 6333
TITLE: USING PLUGIN clause does not work in RECREATE USER
DESCRIPTION:
JIRA: CORE-6083
FBTEST: bugs.core_6083
2022-01-26 21:10:46 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-26 21:10:46 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-26 21:10:46 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-26 21:10:46 +01:00
# fixture used to cleanup only
tmp_user = user_factory('db', name='tmp$c6083', plugin='Srp', do_not_create=True)
2021-04-26 20:07:00 +02:00
2022-01-26 21:10:46 +01:00
test_script = """
2021-04-26 20:07:00 +02:00
-- Following code should NOT raise any output: neither in STDOUT nor in STDERR.
set bail on;
set term ^;
execute block as
begin
begin
-- Here we 'silently drop' user if it remained after previous (failed) run of this test.
-- Exception about non-existent user will be suppressed:
execute statement( 'drop user tmp$c6083 using plugin Srp' ) with autonomous transaction;
when any do
begin
end
end
end
^
set term ;^
commit;
recreate user tmp$c6083 password '123' using plugin Srp;
recreate user tmp$c6083 password '456' using plugin Srp; -- THIS (second) statement raised error before ticket was fixed.
commit;
connect '$(DSN)' user tmp$c6083 password '456'; -- here we want to be sure that user was created SUCCESSFULLY.
commit;
2022-01-26 21:10:46 +01:00
/*
2021-04-26 20:07:00 +02:00
connect '$(DSN)' user sysdba password 'masterkey';
drop user tmp$c6083 using plugin Srp;
2022-01-26 21:10:46 +01:00
commit; */
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-26 21:10:46 +01:00
act = isql_act('db', test_script)
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=4.0')
2022-01-26 21:10:46 +01:00
def test_1(act: Action, tmp_user):
act.execute()