Changeset: df88e22ca60c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=df88e22ca60c
Removed Files:
sql/test/Users/Tests/util.py
Modified Files:
sql/test/Users/Tests/changePasswordUser.SQL.py
sql/test/Users/Tests/changeSchemaUser.SQL.py
sql/test/Users/Tests/columnRights.SQL.py
sql/test/Users/Tests/dropManyUsers.Bug-3764.SQL.py
sql/test/Users/Tests/grantMonetdb.SQL.py
sql/test/Users/Tests/grantMonetdbToRegularUser.Bug-3771.SQL.py
sql/test/Users/Tests/grantMonetdbToSchemaOwner.Bug-3771.SQL.py
sql/test/Users/Tests/grantPrivilegesNonDefaultRole.Bug-3365.SQL.py
sql/test/Users/Tests/grantRevokeAndGrantAgain.Bug-3765.SQL.py
sql/test/Users/Tests/grantRole.Bug-3772.SQL.py
sql/test/Users/Tests/renameUser.SQL.py
sql/test/Users/Tests/role.SQL.py
sql/test/Users/Tests/schemaRights.SQL.py
sql/test/Users/Tests/withGrantOption.SQL.py
Branch: default
Log Message:
Inline code from util.py since it cannot be found during testing on Windows.
diffs (truncated from 309 to 300 lines):
diff --git a/sql/test/Users/Tests/changePasswordUser.SQL.py
b/sql/test/Users/Tests/changePasswordUser.SQL.py
--- a/sql/test/Users/Tests/changePasswordUser.SQL.py
+++ b/sql/test/Users/Tests/changePasswordUser.SQL.py
@@ -3,7 +3,16 @@
# Assess that a user can change its own password.
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
+ import process
+
+def sql_test_client(user, passwd, input):
+ process.client(lang = "sql", user = user, passwd = passwd, communicate =
True,
+ stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
+ input = input, port = int(os.getenv("MAPIPORT")))
sql_test_client('monetdb', 'monetdb', input = """\
ALTER USER april WITH UNENCRYPTED PASSWORD 'april2';
diff --git a/sql/test/Users/Tests/changeSchemaUser.SQL.py
b/sql/test/Users/Tests/changeSchemaUser.SQL.py
--- a/sql/test/Users/Tests/changeSchemaUser.SQL.py
+++ b/sql/test/Users/Tests/changeSchemaUser.SQL.py
@@ -5,7 +5,16 @@
# Drop a user that owns a schema (not possible).
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
+ import process
+
+def sql_test_client(user, passwd, input):
+ process.client(lang = "sql", user = user, passwd = passwd, communicate =
True,
+ stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
+ input = input, port = int(os.getenv("MAPIPORT")))
sql_test_client('monetdb', 'monetdb', input = """\
ALTER USER "april" SET SCHEMA library;
diff --git a/sql/test/Users/Tests/columnRights.SQL.py
b/sql/test/Users/Tests/columnRights.SQL.py
--- a/sql/test/Users/Tests/columnRights.SQL.py
+++ b/sql/test/Users/Tests/columnRights.SQL.py
@@ -4,7 +4,16 @@
# Verify that the user cannot SELECT nor UPDATE on the column it did not get
permissions for.
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
+ import process
+
+def sql_test_client(user, passwd, input):
+ process.client(lang = "sql", user = user, passwd = passwd, communicate =
True,
+ stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
+ input = input, port = int(os.getenv("MAPIPORT")))
sql_test_client('monetdb', 'monetdb', input = """\
GRANT SELECT (price) ON library.orders TO alice;
diff --git a/sql/test/Users/Tests/dropManyUsers.Bug-3764.SQL.py
b/sql/test/Users/Tests/dropManyUsers.Bug-3764.SQL.py
--- a/sql/test/Users/Tests/dropManyUsers.Bug-3764.SQL.py
+++ b/sql/test/Users/Tests/dropManyUsers.Bug-3764.SQL.py
@@ -3,7 +3,16 @@
# Drop four users.
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
+ import process
+
+def sql_test_client(user, passwd, input):
+ process.client(lang = "sql", user = user, passwd = passwd, communicate =
True,
+ stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
+ input = input, port = int(os.getenv("MAPIPORT")))
sql_test_client('monetdb', 'monetdb', input = """\
CREATE SCHEMA newSchema;
diff --git a/sql/test/Users/Tests/grantMonetdb.SQL.py
b/sql/test/Users/Tests/grantMonetdb.SQL.py
--- a/sql/test/Users/Tests/grantMonetdb.SQL.py
+++ b/sql/test/Users/Tests/grantMonetdb.SQL.py
@@ -3,7 +3,16 @@
# Verify that the user can assume the monetdb role and CREATE new users, GRANT
privileges and roles.
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
+ import process
+
+def sql_test_client(user, passwd, input):
+ process.client(lang = "sql", user = user, passwd = passwd, communicate =
True,
+ stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
+ input = input, port = int(os.getenv("MAPIPORT")))
sql_test_client('monetdb', 'monetdb', input = """\
GRANT sysadmin TO alice;
diff --git a/sql/test/Users/Tests/grantMonetdbToRegularUser.Bug-3771.SQL.py
b/sql/test/Users/Tests/grantMonetdbToRegularUser.Bug-3771.SQL.py
--- a/sql/test/Users/Tests/grantMonetdbToRegularUser.Bug-3771.SQL.py
+++ b/sql/test/Users/Tests/grantMonetdbToRegularUser.Bug-3771.SQL.py
@@ -4,7 +4,16 @@
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
+ import process
+
+def sql_test_client(user, passwd, input):
+ process.client(lang = "sql", user = user, passwd = passwd, communicate =
True,
+ stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
+ input = input, port = int(os.getenv("MAPIPORT")))
sql_test_client('monetdb', 'monetdb', input = """\
CREATE USER user_with_many_rights with password 'ThisIsAS3m1S3cur3P4ssw0rd'
name 'user gets monetdb rights' schema sys;
diff --git a/sql/test/Users/Tests/grantMonetdbToSchemaOwner.Bug-3771.SQL.py
b/sql/test/Users/Tests/grantMonetdbToSchemaOwner.Bug-3771.SQL.py
--- a/sql/test/Users/Tests/grantMonetdbToSchemaOwner.Bug-3771.SQL.py
+++ b/sql/test/Users/Tests/grantMonetdbToSchemaOwner.Bug-3771.SQL.py
@@ -4,7 +4,16 @@
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
+ import process
+
+def sql_test_client(user, passwd, input):
+ process.client(lang = "sql", user = user, passwd = passwd, communicate =
True,
+ stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
+ input = input, port = int(os.getenv("MAPIPORT")))
sql_test_client('monetdb', 'monetdb', input = """\
CREATE USER owner with password 'ThisIsAS3m1S3cur3P4ssw0rd' name 'user gets
monetdb rights' schema sys;
diff --git a/sql/test/Users/Tests/grantPrivilegesNonDefaultRole.Bug-3365.SQL.py
b/sql/test/Users/Tests/grantPrivilegesNonDefaultRole.Bug-3365.SQL.py
--- a/sql/test/Users/Tests/grantPrivilegesNonDefaultRole.Bug-3365.SQL.py
+++ b/sql/test/Users/Tests/grantPrivilegesNonDefaultRole.Bug-3365.SQL.py
@@ -4,7 +4,16 @@
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
+ import process
+
+def sql_test_client(user, passwd, input):
+ process.client(lang = "sql", user = user, passwd = passwd, communicate =
True,
+ stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
+ input = input, port = int(os.getenv("MAPIPORT")))
sql_test_client('monetdb', 'monetdb', input = """\
create role hr_role;
diff --git a/sql/test/Users/Tests/grantRevokeAndGrantAgain.Bug-3765.SQL.py
b/sql/test/Users/Tests/grantRevokeAndGrantAgain.Bug-3765.SQL.py
--- a/sql/test/Users/Tests/grantRevokeAndGrantAgain.Bug-3765.SQL.py
+++ b/sql/test/Users/Tests/grantRevokeAndGrantAgain.Bug-3765.SQL.py
@@ -5,7 +5,16 @@
# Assess that it is possible to regrant the revoked privilege.
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
+ import process
+
+def sql_test_client(user, passwd, input):
+ process.client(lang = "sql", user = user, passwd = passwd, communicate =
True,
+ stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
+ input = input, port = int(os.getenv("MAPIPORT")))
sql_test_client('monetdb', 'monetdb', input = """\
CREATE SCHEMA schemaTest;
diff --git a/sql/test/Users/Tests/grantRole.Bug-3772.SQL.py
b/sql/test/Users/Tests/grantRole.Bug-3772.SQL.py
--- a/sql/test/Users/Tests/grantRole.Bug-3772.SQL.py
+++ b/sql/test/Users/Tests/grantRole.Bug-3772.SQL.py
@@ -2,7 +2,16 @@
# Let any user grant any role (not possible).
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
+ import process
+
+def sql_test_client(user, passwd, input):
+ process.client(lang = "sql", user = user, passwd = passwd, communicate =
True,
+ stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
+ input = input, port = int(os.getenv("MAPIPORT")))
sql_test_client('monetdb', 'monetdb', input = """\
CREATE SCHEMA s1;
diff --git a/sql/test/Users/Tests/renameUser.SQL.py
b/sql/test/Users/Tests/renameUser.SQL.py
--- a/sql/test/Users/Tests/renameUser.SQL.py
+++ b/sql/test/Users/Tests/renameUser.SQL.py
@@ -10,7 +10,16 @@
# Create an user with a name of an existing user (not possible).
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
+ import process
+
+def sql_test_client(user, passwd, input):
+ process.client(lang = "sql", user = user, passwd = passwd, communicate =
True,
+ stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
+ input = input, port = int(os.getenv("MAPIPORT")))
sql_test_client('monetdb', 'monetdb', input = """\
ALTER USER "april" RENAME TO "april2"; --succeed
diff --git a/sql/test/Users/Tests/role.SQL.py b/sql/test/Users/Tests/role.SQL.py
--- a/sql/test/Users/Tests/role.SQL.py
+++ b/sql/test/Users/Tests/role.SQL.py
@@ -5,7 +5,16 @@
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
+ import process
+
+def sql_test_client(user, passwd, input):
+ process.client(lang = "sql", user = user, passwd = passwd, communicate =
True,
+ stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
+ input = input, port = int(os.getenv("MAPIPORT")))
sql_test_client('monetdb', 'monetdb', input = """\
REVOKE bankAdmin from april;
diff --git a/sql/test/Users/Tests/schemaRights.SQL.py
b/sql/test/Users/Tests/schemaRights.SQL.py
--- a/sql/test/Users/Tests/schemaRights.SQL.py
+++ b/sql/test/Users/Tests/schemaRights.SQL.py
@@ -4,7 +4,16 @@
# Verify that the user can DROP SCHEMA created by both the 'monetdb' user and
the created user.
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
+ import process
+
+def sql_test_client(user, passwd, input):
+ process.client(lang = "sql", user = user, passwd = passwd, communicate =
True,
+ stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
+ input = input, port = int(os.getenv("MAPIPORT")))
sql_test_client('monetdb', 'monetdb', input = """\
CREATE USER user1 WITH PASSWORD 'user1' name 'schema test user1' schema sys;
diff --git a/sql/test/Users/Tests/util.py b/sql/test/Users/Tests/util.py
deleted file mode 100644
--- a/sql/test/Users/Tests/util.py
+++ /dev/null
@@ -1,10 +0,0 @@
-import os, sys
-try:
- from MonetDBtesting import process
-except ImportError:
- import process
-
-def sql_test_client(user, passwd, input):
- process.client(lang='sql', user = user, passwd = passwd, communicate =
True,
- stdin = process.PIPE, stdout = process.PIPE, stderr =
process.PIPE,
- input = input, port = int(os.getenv('MAPIPORT')))
diff --git a/sql/test/Users/Tests/withGrantOption.SQL.py
b/sql/test/Users/Tests/withGrantOption.SQL.py
--- a/sql/test/Users/Tests/withGrantOption.SQL.py
+++ b/sql/test/Users/Tests/withGrantOption.SQL.py
@@ -3,7 +3,16 @@
# Verify that the user can regrant the privilege.
###
-from util import sql_test_client
+import os, sys
+try:
+ from MonetDBtesting import process
+except ImportError:
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list