Open imavo opened 1 month ago
@imavo, Please raise a pull request. Thanks
@Earammak P.R created (ignore the update above re the Closed PR, and instead choose the PR from the main menu. I had to discard the first PR because the DCO was missing, and redo the PR but the second time around it did not put another comment for the new PR into this ticket for some reason).
Operating System Name: linux x64
db2level output from clidriver if in use: 11.5.0.9
Target Db2 Server Version: Db2-LUW 11.5.8
Python Version: 3.9.5, 3.10.2
ibm_db version: 3.2.3
For non-Windows, output of below commands: uname linux uname -m x86_64
Value of below environment variables if set: IBM_DB_HOME: n/a PATH: LIB/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH: (../clidriver/lib) (.../clidriver/bin)
Test script to reproduce the problem. existing testscripts test_trusted_context_connect.py, test_trusted_context_pconnect.py
For installation related issue, complete output of
pip install ibm_db
command. (not installation related)Steps to Reproduce:
test_trusted_context_connect.py
andtest_trusted_context_pconnect.py
against a Db2-LUW server, using a current version of clidriver (e.g. 11.5.9)Narrative
Recent versions of clidriver changed the text of some messages and as a result the existing testscripts named
test_trusted_context_connect.py
andtest_trusted_context_pconnect.py
will always fail (when previously they would have passed).The failures happen because the expected output messages from CLI differ slightly for actual messages for SQL0551N, so the regular expressions (comparing expected-output to actual-output) will not match.
In addition, both of these testscripts create the trusted-context with the assumption that the testscripts will run on the same hostname as the Db2-server (only a single ADDRESS is specified). As a consequence , when the trusted-context testscripts run on a different computer than the Db2-server, they will fail, because the trusted-context they create omits the local hostname, and only adds the hostname of the config.hostname (which must be the Db2-server in order to connect successfully).
Changing the testscript code so that the local hostname gets added as the ADDRESS when creating the trusted context will allow the testscripts to run remotely from the Db2-server, as well as locally on the Db2-server (where that is supported/workable).
I have made the code changes locally, and both testscripts now "PASS" when run from remote.
Should I create a PR for this?
Or should I just attach the modified test-scripts here? Or do you prefer to work out the testscript changes by yourselves? Note: no code changes are needed in ibm_db.c itself, only to the two testscripts.