2021-12-30 19:43:52 +01:00
|
|
|
#coding:utf-8
|
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
"""
|
|
|
|
ID: issue-6817
|
|
|
|
ISSUE: 6817
|
|
|
|
TITLE: Command switch "-fetch_password <passwordfile>" does not work with gfix
|
|
|
|
DESCRIPTION:
|
2022-02-02 15:46:19 +01:00
|
|
|
FBTEST: bugs.gh_6817
|
2022-01-27 20:08:36 +01:00
|
|
|
"""
|
2021-12-30 19:43:52 +01:00
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
import pytest
|
|
|
|
from pathlib import Path
|
|
|
|
from firebird.qa import *
|
2021-12-30 19:43:52 +01:00
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
db = db_factory()
|
2021-12-30 19:43:52 +01:00
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
act = python_act('db')
|
2021-12-30 19:43:52 +01:00
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
passfile = temp_file('tmp_gh_6817.dat')
|
2021-12-30 19:43:52 +01:00
|
|
|
|
2023-12-29 07:13:13 +01:00
|
|
|
@pytest.mark.version('>=3.0.7')
|
2022-01-27 20:08:36 +01:00
|
|
|
def test_1(act: Action, passfile: Path):
|
|
|
|
passfile.write_text(act.db.password)
|
2023-12-29 07:13:13 +01:00
|
|
|
act.gfix(switches=['-user', act.db.user, '-fetch_password', passfile, act.db.dsn, '-w', 'async'],
|
2022-01-27 20:08:36 +01:00
|
|
|
credentials=False)
|
2023-12-29 07:13:13 +01:00
|
|
|
act.gfix(switches=['-fetch_password', passfile, act.db.dsn, '-user', act.db.user, '-w', 'async'],
|
2022-01-27 20:08:36 +01:00
|
|
|
credentials=False)
|
2023-12-29 07:13:13 +01:00
|
|
|
act.gfix(switches=['-user', act.db.user, act.db.dsn, '-fetch_password', passfile, '-w', 'async'],
|
2022-01-27 20:08:36 +01:00
|
|
|
credentials=False)
|
2023-12-29 07:13:13 +01:00
|
|
|
act.gfix(switches=[act.db.dsn, '-fetch_password', passfile, '-user', act.db.user, '-w', 'async'],
|
2022-01-27 20:08:36 +01:00
|
|
|
credentials=False)
|