Changeset: 3f6bfb98715f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/3f6bfb98715f Modified Files: sql/odbc/tests/Tests/ODBCconnect.py testing/Mtest.py.in Branch: Aug2024 Log Message:
Test SQLConnect user/pass parameters take precedence Modify MonetDB-Test-Wrong dsn in Mtest.py to not set DATABASE wrong as there is no way we can override it in with SQLConnect. diffs (41 lines): diff --git a/sql/odbc/tests/Tests/ODBCconnect.py b/sql/odbc/tests/Tests/ODBCconnect.py --- a/sql/odbc/tests/Tests/ODBCconnect.py +++ b/sql/odbc/tests/Tests/ODBCconnect.py @@ -144,6 +144,16 @@ ex.expect('Error') ex.expect('28000:') # 28000 bad credentials ex.end() +# parameters passed directly to SQLConnect override those from the dsn +ex = Execution(dsn + '-Wrong') +ex.expect_fail() +ex.expect('Error') +ex.expect('28000:') # this dsn uses the wrong user name and password +ex.end() +ex = Execution(dsn + '-Wrong', '-u', user, '-p', password) +ex.expect('OK') # but those passes as arguments take precedence +ex.end() + # test non-NUL terminated strings ex = Execution(dsn, '-0') @@ -213,7 +223,7 @@ ex.expect('RESULT') ex.expect('- banana;') # as set by Client Remark property ex.expect('OK') ex.expect('RESULT') -ex.expect('- ;') # this connection did not have a Client Remark +ex.expect('- ;') # the second connection does not have a Client Remark ex.end() diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -2239,7 +2239,7 @@ Description = Wrong values for Database, Driver = MonetDB Host = localhost Port = {env["MAPIPORT"]} -Database = {TSTDB}-Wrong +Database = {TSTDB} User = {user or "monetdb"}-Wrong Password = {passwd or "monetdb"}-Wrong ''') _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org