Skip to content

Commit

Permalink
Fix row_level_security_adapter_script.txt and cleanup connect_to_exas…
Browse files Browse the repository at this point in the history
…ol_with_websocket_api.py
  • Loading branch information
tkilias committed Jul 13, 2023
1 parent 874469f commit 8ee0c0b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,6 @@ class WebsocketAPIConnectionTest(udf.TestCase):
def setUp(self):
self.query('create schema websocket_api', ignore_errors=True)

def run_unsecure_websocket_api_connection(self, python_version):
self.query(udf.fixindent('''
CREATE OR REPLACE %s SCALAR SCRIPT websocket_api.connect_unsecure() returns int AS
import EXASOL
import os
def run(ctx):
os.environ["USER"]="exasolution"
with EXASOL.connect('ws://%s', '%s', '%s') as connection:
with connection.cursor() as cursor:
cursor.execute('SELECT 1 FROM dual')
for row in cursor:
pass
/
''' % (python_version, self.connection, self.user, self.pwd)))
self.query('''SELECT websocket_api.connect_unsecure() FROM dual''')

def run_secure_websocket_api_connection(self, python_version):
self.query(udf.fixindent('''
CREATE OR REPLACE %s SCALAR SCRIPT websocket_api.connect_secure() returns int AS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def user_wants_only_active(username, meta_connection, adapter_schema):
import EXASOL
c = exa.get_connection(meta_connection)

with EXASOL.connect(c.address, c.user, c.password) as connection:
with EXASOL.connect(c.address, c.user, c.password, sslopt={"cert_reqs": ssl.CERT_NONE}) as connection:
with connection.cursor() as cursor:
query = """select wants_only_active from "%s".user_pref where username='%s'""" % (adapter_schema, username)
#print("user_wants_only_active", query)
Expand Down

0 comments on commit 8ee0c0b

Please sign in to comment.