2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
|
|
|
|
2022-01-25 22:55:48 +01:00
|
|
|
"""
|
|
|
|
ID: issue-5438
|
|
|
|
ISSUE: 5438
|
|
|
|
TITLE: [CREATE OR] ALTER USER statement: clause PASSWORD (if present) must be always specified just after USER
|
|
|
|
DESCRIPTION:
|
|
|
|
JIRA: CORE-5155
|
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-25 22:55:48 +01:00
|
|
|
import pytest
|
|
|
|
from firebird.qa import *
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-25 22:55:48 +01:00
|
|
|
db = db_factory()
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-25 22:55:48 +01:00
|
|
|
test_script = """
|
|
|
|
create or alter user tmp$c5155 password '123' firstname 'john' revoke admin role;
|
|
|
|
create or alter user tmp$c5155 revoke admin role firstname 'john' password '123';
|
|
|
|
create or alter user tmp$c5155 firstname 'john' revoke admin role password '123' lastname 'smith';
|
|
|
|
create or alter user tmp$c5155 lastname 'adams' grant admin role firstname 'mick' password '123';
|
|
|
|
create or alter user tmp$c5155 revoke admin role lastname 'adams' firstname 'mick' password '123';
|
2021-04-26 20:07:00 +02:00
|
|
|
drop user tmp$c5155;
|
2021-12-22 20:23:11 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-25 22:55:48 +01:00
|
|
|
act = isql_act('db', test_script)
|
2021-04-26 20:07:00 +02:00
|
|
|
|
|
|
|
@pytest.mark.version('>=3.0')
|
2022-01-25 22:55:48 +01:00
|
|
|
def test_1(act: Action):
|
|
|
|
act.execute()
|
2021-04-26 20:07:00 +02:00
|
|
|
|