Changeset: 27ebcea619af for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/27ebcea619af
Modified Files:
clients/Tests/mclient-uri.SQL.py
Branch: Mar2025
Log Message:
Also test for monetdb://... URIs.
diffs (77 lines):
diff --git a/clients/Tests/mclient-uri.SQL.py b/clients/Tests/mclient-uri.SQL.py
--- a/clients/Tests/mclient-uri.SQL.py
+++ b/clients/Tests/mclient-uri.SQL.py
@@ -1,7 +1,36 @@
import os, sys
from MonetDBtesting import process
-with process.client('sql',
dbname='mapi:monetdb://{}:{}/{}?language=sql&user=monetdb'.format(os.getenv('HOST',
'localhost'), os.getenv('MAPIPORT', 50000), os.getenv('TSTDB', 'demo')),
host='', port='', format='csv', echo=False, stdin=process.PIPE,
stdout=process.PIPE, stderr=process.PIPE) as c:
+host = os.getenv('HOST', 'localhost')
+port = os.getenv('MAPIPORT', 50000)
+db = os.getenv('TSTDB', 'demo')
+mapihost = os.getenv('MAPIHOST', '/tmp') # not used on Windows
+
+with process.client('sql',
+
dbname=f'mapi:monetdb://{host}:{port}/{db}?language=sql&user=monetdb',
+ host='',
+ port='',
+ format='csv',
+ echo=False,
+ stdin=process.PIPE,
+ stdout=process.PIPE,
+ stderr=process.PIPE) as c:
+ out, err = c.communicate('select 1;\n')
+
+if out != '1\n':
+ print(out)
+if err:
+ print(err, file=sys.stderr)
+
+with process.client('sql',
+
dbname=f'monetdb://{host}:{port}/{db}?language=sql&user=monetdb&password=monetdb',
+ host='',
+ port='',
+ format='csv',
+ echo=False,
+ stdin=process.PIPE,
+ stdout=process.PIPE,
+ stderr=process.PIPE) as c:
out, err = c.communicate('select 1;\n')
if out != '1\n':
@@ -10,10 +39,34 @@ if err:
print(err, file=sys.stderr)
if os.name != 'nt':
- with process.client('sql',
dbname='mapi:monetdb://{}/.s.monetdb.{}?database={}&language=sql&user=monetdb'.format(os.getenv('MAPIHOST',
'/tmp'), os.getenv('MAPIPORT', 50000), os.getenv('TSTDB', 'demo')), host='',
port='', format='csv', echo=False, stdin=process.PIPE, stdout=process.PIPE,
stderr=process.PIPE) as c:
+ with process.client('sql',
+
dbname=f'mapi:monetdb://{mapihost}/.s.monetdb.{port}?database={db}&language=sql&user=monetdb',
+ host='',
+ port='',
+ format='csv',
+ echo=False,
+ stdin=process.PIPE,
+ stdout=process.PIPE,
+ stderr=process.PIPE) as c:
out, err = c.communicate('select 1;\n')
if out != '1\n':
print(out)
if err:
print(err, file=sys.stderr)
+
+ with process.client('sql',
+
dbname=f'monetdb:///{db}?sock={mapihost}/.s.monetdb.{port}&language=sql&user=monetdb&password=monetdb',
+ host='',
+ port='',
+ format='csv',
+ echo=False,
+ stdin=process.PIPE,
+ stdout=process.PIPE,
+ stderr=process.PIPE) as c:
+ out, err = c.communicate('select 1;\n')
+
+ if out != '1\n':
+ print(out)
+ if err:
+ print(err, file=sys.stderr)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]