mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Use sufficiently long random strings in test objects to avoid conflicts.
This commit is contained in:
parent
fe7cfa35df
commit
80c4a3fb1a
@ -37,7 +37,7 @@ class EventTriggerAddTestCase(BaseTestGenerator):
|
||||
self.schema_id = self.schema_data['schema_id']
|
||||
self.extension_name = "postgres_fdw"
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.func_name = "trigger_func_%s" % str(uuid.uuid4())[1:6]
|
||||
self.func_name = "trigger_func_%s" % str(uuid.uuid4())[1:8]
|
||||
self.db_user = self.server["username"]
|
||||
server_con = server_utils.connect_server(self, self.server_id)
|
||||
if not server_con["info"] == "Server connected.":
|
||||
@ -76,7 +76,7 @@ class EventTriggerAddTestCase(BaseTestGenerator):
|
||||
"eventfunname": "%s.%s" % (self.schema_name, self.func_name),
|
||||
"eventname": "DDL_COMMAND_END",
|
||||
"eventowner": self.db_user,
|
||||
"name": "event_trigger_add_%s" % (str(uuid.uuid4())[1:6]),
|
||||
"name": "event_trigger_add_%s" % (str(uuid.uuid4())[1:8]),
|
||||
"providers": []
|
||||
}
|
||||
response = self.tester.post(
|
||||
|
@ -38,9 +38,9 @@ class EventTriggerDeleteTestCase(BaseTestGenerator):
|
||||
self.extension_name = "postgres_fdw"
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.db_user = self.server["username"]
|
||||
self.func_name = "trigger_func_%s" % str(uuid.uuid4())[1:6]
|
||||
self.func_name = "trigger_func_%s" % str(uuid.uuid4())[1:8]
|
||||
self.trigger_name = "event_trigger_delete_%s" % (
|
||||
str(uuid.uuid4())[1:6])
|
||||
str(uuid.uuid4())[1:8])
|
||||
server_con = server_utils.connect_server(self, self.server_id)
|
||||
if not server_con["info"] == "Server connected.":
|
||||
raise Exception("Could not connect to server to add resource "
|
||||
|
@ -38,8 +38,8 @@ class EventTriggerGetTestCase(BaseTestGenerator):
|
||||
self.extension_name = "postgres_fdw"
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.db_user = self.server["username"]
|
||||
self.func_name = "trigger_func_%s" % str(uuid.uuid4())[1:6]
|
||||
self.trigger_name = "event_trigger_get_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.func_name = "trigger_func_%s" % str(uuid.uuid4())[1:8]
|
||||
self.trigger_name = "event_trigger_get_%s" % (str(uuid.uuid4())[1:8])
|
||||
server_con = server_utils.connect_server(self, self.server_id)
|
||||
if not server_con["info"] == "Server connected.":
|
||||
raise Exception("Could not connect to server to add resource "
|
||||
|
@ -39,8 +39,8 @@ class EventTriggerPutTestCase(BaseTestGenerator):
|
||||
self.extension_name = "postgres_fdw"
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.db_user = self.server["username"]
|
||||
self.func_name = "trigger_func_%s" % str(uuid.uuid4())[1:6]
|
||||
self.trigger_name = "event_trigger_put_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.func_name = "trigger_func_%s" % str(uuid.uuid4())[1:8]
|
||||
self.trigger_name = "event_trigger_put_%s" % (str(uuid.uuid4())[1:8])
|
||||
server_con = server_utils.connect_server(self, self.server_id)
|
||||
if not server_con["info"] == "Server connected.":
|
||||
raise Exception("Could not connect to server to add resource "
|
||||
|
@ -40,7 +40,7 @@ class ForeignServerAddTestCase(BaseTestGenerator):
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.extension_name = "cube"
|
||||
self.fdw_name = "fdw_{0}".format(str(uuid.uuid4())[1:6])
|
||||
self.fdw_name = "fdw_{0}".format(str(uuid.uuid4())[1:8])
|
||||
self.extension_id = extension_utils.create_extension(
|
||||
self.server, self.db_name, self.extension_name, self.schema_name)
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
@ -90,7 +90,7 @@ class ForeignServerAddTestCase(BaseTestGenerator):
|
||||
}
|
||||
],
|
||||
"fsrvowner": db_user,
|
||||
"name": "test_fsrv_add_%s" % (str(uuid.uuid4())[1:6])
|
||||
"name": "test_fsrv_add_%s" % (str(uuid.uuid4())[1:8])
|
||||
}
|
||||
response = self.tester.post(
|
||||
self.url + str(utils.SERVER_GROUP) + '/' +
|
||||
|
@ -38,8 +38,8 @@ class ForeignServerDeleteTestCase(BaseTestGenerator):
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.extension_name = "cube"
|
||||
self.fdw_name = "test_fdw_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fsrv_name = "test_fsrv_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fdw_name = "test_fdw_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.fsrv_name = "test_fsrv_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.extension_id = extension_utils.create_extension(
|
||||
self.server, self.db_name, self.extension_name, self.schema_name)
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
|
@ -38,8 +38,8 @@ class ForeignServerGetTestCase(BaseTestGenerator):
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.extension_name = "cube"
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fsrv_name = "test_fsrv_add_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.fsrv_name = "test_fsrv_add_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.extension_id = extension_utils.create_extension(
|
||||
self.server, self.db_name, self.extension_name, self.schema_name)
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
|
@ -39,8 +39,8 @@ class ForeignServerPutTestCase(BaseTestGenerator):
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.extension_name = "cube"
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fsrv_name = "test_fsrv_put_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.fsrv_name = "test_fsrv_put_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.extension_id = extension_utils.create_extension(
|
||||
self.server, self.db_name, self.extension_name, self.schema_name)
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
@ -82,4 +82,4 @@ class ForeignServerPutTestCase(BaseTestGenerator):
|
||||
and dependant objects."""
|
||||
extension_utils.drop_extension(self.server, self.db_name,
|
||||
self.extension_name)
|
||||
database_utils.disconnect_database(self, self.server_id, self.db_id)
|
||||
database_utils.disconnect_database(self, self.server_id, self.db_id)
|
||||
|
@ -41,8 +41,8 @@ class UserMappingAddTestCase(BaseTestGenerator):
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.extension_name = "cube"
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.extension_id = extension_utils.create_extension(
|
||||
self.server, self.db_name, self.extension_name, self.schema_name)
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
|
@ -40,8 +40,8 @@ class UserMappingDeleteTestCase(BaseTestGenerator):
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.extension_name = "cube"
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.extension_id = extension_utils.create_extension(
|
||||
self.server, self.db_name, self.extension_name, self.schema_name)
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
|
@ -40,8 +40,8 @@ class UserMappingGetTestCase(BaseTestGenerator):
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.extension_name = "cube"
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.extension_id = extension_utils.create_extension(
|
||||
self.server, self.db_name, self.extension_name, self.schema_name)
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
|
@ -41,8 +41,8 @@ class UserMappingPutTestCase(BaseTestGenerator):
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.extension_name = "cube"
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.extension_id = extension_utils.create_extension(
|
||||
self.server, self.db_name, self.extension_name, self.schema_name)
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
|
@ -34,7 +34,7 @@ class FDWDDeleteTestCase(BaseTestGenerator):
|
||||
self.db_id = self.schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.fdw_name = "fdw_{0}".format(str(uuid.uuid4())[1:6])
|
||||
self.fdw_name = "fdw_{0}".format(str(uuid.uuid4())[1:8])
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
self.fdw_name)
|
||||
|
||||
|
@ -34,7 +34,7 @@ class FDWDGetTestCase(BaseTestGenerator):
|
||||
self.db_id = self.schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.fdw_name = "fdw_{0}".format(str(uuid.uuid4())[1:4])
|
||||
self.fdw_name = "fdw_{0}".format(str(uuid.uuid4())[1:8])
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
self.fdw_name)
|
||||
|
||||
|
@ -35,7 +35,7 @@ class FDWDPutTestCase(BaseTestGenerator):
|
||||
self.db_id = self.schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.fdw_name = "fdw_put_{0}".format(str(uuid.uuid4())[1:6])
|
||||
self.fdw_name = "fdw_put_{0}".format(str(uuid.uuid4())[1:8])
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
self.fdw_name)
|
||||
|
||||
|
@ -35,7 +35,7 @@ def get_fdw_data(schema_name, db_user):
|
||||
],
|
||||
"fdwoptions": [],
|
||||
"fdwowner": db_user,
|
||||
"name": "fdw_add_%s" % (str(uuid.uuid4())[1:6])
|
||||
"name": "fdw_add_%s" % (str(uuid.uuid4())[1:8])
|
||||
}
|
||||
return data
|
||||
|
||||
|
@ -48,7 +48,7 @@ class LanguagesAddTestCase(BaseTestGenerator):
|
||||
"lanowner": db_user,
|
||||
"lanproc": "plpgsql_call_handler",
|
||||
"lanval": "fmgr_c_validator",
|
||||
"name": "language_%s" % str(uuid.uuid4())[1:4],
|
||||
"name": "language_%s" % str(uuid.uuid4())[1:8],
|
||||
"seclabels": [],
|
||||
"template_list":
|
||||
[
|
||||
|
@ -29,7 +29,7 @@ class LanguagesDeleteTestCase(BaseTestGenerator):
|
||||
self.server_id = self.server_data["server_id"]
|
||||
self.db_id = self.server_data['db_id']
|
||||
self.db_name = self.server_data["db_name"]
|
||||
self.lang_name = "language_%s" % str(uuid.uuid4())[1:4]
|
||||
self.lang_name = "language_%s" % str(uuid.uuid4())[1:8]
|
||||
|
||||
db_con = database_utils.connect_database(self,
|
||||
utils.SERVER_GROUP,
|
||||
|
@ -29,7 +29,7 @@ class LanguagesGetTestCase(BaseTestGenerator):
|
||||
self.server_id = self.server_data["server_id"]
|
||||
self.db_id = self.server_data['db_id']
|
||||
self.db_name = self.server_data["db_name"]
|
||||
self.lang_name = "language_%s" % str(uuid.uuid4())[1:4]
|
||||
self.lang_name = "language_%s" % str(uuid.uuid4())[1:8]
|
||||
db_con = database_utils.connect_database(self,
|
||||
utils.SERVER_GROUP,
|
||||
self.server_id,
|
||||
|
@ -30,7 +30,7 @@ class LanguagesPutTestCase(BaseTestGenerator):
|
||||
self.server_id = self.server_data["server_id"]
|
||||
self.db_id = self.server_data['db_id']
|
||||
self.db_name = self.server_data["db_name"]
|
||||
self.lang_name = "language_%s" % str(uuid.uuid4())[1:4]
|
||||
self.lang_name = "language_%s" % str(uuid.uuid4())[1:8]
|
||||
db_con = database_utils.connect_database(self,
|
||||
utils.SERVER_GROUP,
|
||||
self.server_id,
|
||||
|
@ -30,7 +30,7 @@ class CollationAddTestCase(BaseTestGenerator):
|
||||
self.database_info = parent_node_dict["database"][-1]
|
||||
self.db_name = self.database_info["db_name"]
|
||||
# Change the db name, so that schema will create in newly created db
|
||||
self.schema_name = "schema_get_%s" % str(uuid.uuid4())[1:6]
|
||||
self.schema_name = "schema_get_%s" % str(uuid.uuid4())[1:8]
|
||||
connection = utils.get_db_connection(self.db_name,
|
||||
self.server['username'],
|
||||
self.server['db_password'],
|
||||
@ -59,7 +59,7 @@ class CollationAddTestCase(BaseTestGenerator):
|
||||
|
||||
data = {
|
||||
"copy_collation": "pg_catalog.\"C\"",
|
||||
"name": "collation_add_%s" % str(uuid.uuid4())[1:6],
|
||||
"name": "collation_add_%s" % str(uuid.uuid4())[1:8],
|
||||
"owner": self.server["username"],
|
||||
"schema": schema_name
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class CollationDeleteTestCase(BaseTestGenerator):
|
||||
self.schema_info = parent_node_dict["schema"][-1]
|
||||
self.schema_name = self.schema_info["schema_name"]
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
coll_name = "collation_get_%s" % str(uuid.uuid4())[1:6]
|
||||
coll_name = "collation_get_%s" % str(uuid.uuid4())[1:8]
|
||||
self.collation = collation_utils.create_collation(self.server,
|
||||
self.schema_name,
|
||||
coll_name,
|
||||
|
@ -30,7 +30,7 @@ class CollationGetTestCase(BaseTestGenerator):
|
||||
self.schema_info = parent_node_dict["schema"][-1]
|
||||
self.schema_name = self.schema_info["schema_name"]
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
coll_name = "collation_get_%s" % str(uuid.uuid4())[1:6]
|
||||
coll_name = "collation_get_%s" % str(uuid.uuid4())[1:8]
|
||||
self.collation = collation_utils.create_collation(self.server,
|
||||
self.schema_name,
|
||||
coll_name,
|
||||
|
@ -31,7 +31,7 @@ class CollationPutTestCase(BaseTestGenerator):
|
||||
self.schema_info = parent_node_dict["schema"][-1]
|
||||
self.schema_name = self.schema_info["schema_name"]
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
coll_name = "collation_get_%s" % str(uuid.uuid4())[1:6]
|
||||
coll_name = "collation_get_%s" % str(uuid.uuid4())[1:8]
|
||||
self.collation = collation_utils.create_collation(self.server,
|
||||
self.schema_name,
|
||||
coll_name,
|
||||
|
@ -59,7 +59,7 @@ class DomainAddTestCase(BaseTestGenerator):
|
||||
"is_tlength": True,
|
||||
"max_val": 2147483647,
|
||||
"min_val": 1,
|
||||
"name": "domain_add_%s" % (str(uuid.uuid4())[1:6]),
|
||||
"name": "domain_add_%s" % (str(uuid.uuid4())[1:8]),
|
||||
"owner": self.server["username"],
|
||||
"seclabels": [],
|
||||
"typdefault": "1",
|
||||
|
@ -32,7 +32,7 @@ class DomainDeleteTestCase(BaseTestGenerator):
|
||||
self.schema_info = parent_node_dict["schema"][-1]
|
||||
self.schema_name = self.schema_info["schema_name"]
|
||||
self.schema_id = self.schema_info["schema_id"]
|
||||
self.domain_name = "domain_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.domain_name = "domain_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.domain_info = domain_utils.create_domain(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
|
@ -32,7 +32,7 @@ class DomainGetTestCase(BaseTestGenerator):
|
||||
self.schema_info = parent_node_dict["schema"][-1]
|
||||
self.schema_name = self.schema_info["schema_name"]
|
||||
self.schema_id = self.schema_info["schema_id"]
|
||||
self.domain_name = "domain_get_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.domain_name = "domain_get_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.domain_info = domain_utils.create_domain(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
|
@ -33,7 +33,7 @@ class DomainPutTestCase(BaseTestGenerator):
|
||||
self.schema_info = parent_node_dict["schema"][-1]
|
||||
self.schema_name = self.schema_info["schema_name"]
|
||||
self.schema_id = self.schema_info["schema_id"]
|
||||
self.domain_name = "domain_put_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.domain_name = "domain_put_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.domain_info = domain_utils.create_domain(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
|
@ -43,8 +43,8 @@ class ForeignTableAddTestCase(BaseTestGenerator):
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.schema_id = self.schema_data['schema_id']
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:4])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:4])
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
self.fdw_name)
|
||||
self.fsrv_id = fsrv_utils.create_fsrv(self.server, self.db_name,
|
||||
@ -81,7 +81,7 @@ class ForeignTableAddTestCase(BaseTestGenerator):
|
||||
"ftoptions": [],
|
||||
"inherits": [],
|
||||
"ftsrvname": self.fsrv_name,
|
||||
"name": "ft_%s" % (str(uuid.uuid4())[1:4]),
|
||||
"name": "ft_%s" % (str(uuid.uuid4())[1:8]),
|
||||
"owner": self.server["username"],
|
||||
"relacl": [],
|
||||
"seclabels": [],
|
||||
|
@ -43,9 +43,9 @@ class ForeignTableDeleteTestCase(BaseTestGenerator):
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.schema_id = self.schema_data['schema_id']
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:4])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:4])
|
||||
self.ft_name = "ft_%s" % (str(uuid.uuid4())[1:4])
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.ft_name = "ft_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
self.fdw_name)
|
||||
self.fsrv_id = fsrv_utils.create_fsrv(self.server, self.db_name,
|
||||
|
@ -42,9 +42,9 @@ class ForeignTableGetTestCase(BaseTestGenerator):
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.schema_id = self.schema_data['schema_id']
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:4])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:4])
|
||||
self.ft_name = "ft_%s" % (str(uuid.uuid4())[1:4])
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.ft_name = "ft_%s" % (str(uuid.uuid4())[1:8])
|
||||
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
self.fdw_name)
|
||||
|
@ -43,9 +43,9 @@ class ForeignTablePutTestCase(BaseTestGenerator):
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.schema_name = self.schema_data['schema_name']
|
||||
self.schema_id = self.schema_data['schema_id']
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:4])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:4])
|
||||
self.ft_name = "ft_%s" % (str(uuid.uuid4())[1:4])
|
||||
self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.ft_name = "ft_%s" % (str(uuid.uuid4())[1:8])
|
||||
|
||||
self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
|
||||
self.fdw_name)
|
||||
|
@ -43,7 +43,7 @@ class FTSConfiguraionAddTestCase(BaseTestGenerator):
|
||||
self.server_id = schema_data['server_id']
|
||||
self.db_id = schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:8]
|
||||
self.fts_parser_id = fts_parser_utils.create_fts_parser(
|
||||
self.server, self.db_name, self.schema_name, self.fts_parser_name)
|
||||
|
||||
@ -64,7 +64,7 @@ class FTSConfiguraionAddTestCase(BaseTestGenerator):
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema.")
|
||||
|
||||
self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4())[1:8]
|
||||
data = \
|
||||
{
|
||||
"name": self.fts_conf_name,
|
||||
|
@ -39,7 +39,7 @@ class FTSConfDeleteTestCase(BaseTestGenerator):
|
||||
self.server_id = schema_data['server_id']
|
||||
self.db_id = schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4())[1:8]
|
||||
|
||||
self.fts_conf_id = fts_configuration_utils.create_fts_configuration(
|
||||
self.server, self.db_name, self.schema_name, self.fts_conf_name)
|
||||
|
@ -41,7 +41,7 @@ class FTSConfGetTestCase(BaseTestGenerator):
|
||||
self.server_id = schema_data['server_id']
|
||||
self.db_id = schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4())[1:8]
|
||||
|
||||
self.fts_conf_id = fts_configuration_utils.create_fts_configuration(
|
||||
self.server, self.db_name, self.schema_name, self.fts_conf_name)
|
||||
|
@ -42,7 +42,7 @@ class FTSConfPutTestCase(BaseTestGenerator):
|
||||
self.server_id = schema_data['server_id']
|
||||
self.db_id = schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4())[1:8]
|
||||
|
||||
self.fts_conf_id = fts_configuration_utils.create_fts_configuration(
|
||||
self.server, self.db_name, self.schema_name, self.fts_conf_name)
|
||||
|
@ -54,7 +54,7 @@ class FtsDictionaryAddTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema.")
|
||||
self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4())[1:8]
|
||||
data = \
|
||||
{
|
||||
"name": self.fts_dict_name,
|
||||
|
@ -38,7 +38,7 @@ class FtsDictionaryDeleteTestCase(BaseTestGenerator):
|
||||
self.server_id = self.schema_data['server_id']
|
||||
self.db_id = self.schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4())[1:8]
|
||||
|
||||
self.fts_dict_id = fts_dict_utils.create_fts_dictionary(
|
||||
self.server,
|
||||
|
@ -38,7 +38,7 @@ class FtsDictionaryGetTestCase(BaseTestGenerator):
|
||||
self.server_id = self.schema_data['server_id']
|
||||
self.db_id = self.schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4())[1:8]
|
||||
|
||||
self.fts_dict_id = fts_dict_utils.create_fts_dictionary(
|
||||
self.server,
|
||||
|
@ -39,7 +39,7 @@ class FtsDictionaryPutTestCase(BaseTestGenerator):
|
||||
self.server_id = self.schema_data['server_id']
|
||||
self.db_id = self.schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4())[1:8]
|
||||
|
||||
self.fts_dict_id = fts_dict_utils.create_fts_dictionary(
|
||||
self.server,
|
||||
|
@ -53,7 +53,7 @@ class FtsParserAddTestCase(BaseTestGenerator):
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema.")
|
||||
|
||||
self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:8]
|
||||
self.data = \
|
||||
{
|
||||
"name": self.fts_parser_name,
|
||||
|
@ -37,7 +37,7 @@ class FtsParserDeleteTestCase(BaseTestGenerator):
|
||||
self.server_id = self.schema_data['server_id']
|
||||
self.db_id = self.schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:8]
|
||||
|
||||
self.fts_parser_id = fts_parser_utils.create_fts_parser(
|
||||
self.server,
|
||||
|
@ -37,7 +37,7 @@ class FtsParserGetTestCase(BaseTestGenerator):
|
||||
self.server_id = self.schema_data['server_id']
|
||||
self.db_id = self.schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:8]
|
||||
|
||||
self.fts_parser_id = fts_parser_utils.create_fts_parser(
|
||||
self.server,
|
||||
|
@ -38,7 +38,7 @@ class FtsParserPutTestCase(BaseTestGenerator):
|
||||
self.server_id = self.schema_data['server_id']
|
||||
self.db_id = self.schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:8]
|
||||
|
||||
self.fts_parser_id = fts_parser_utils.create_fts_parser(
|
||||
self.server,
|
||||
|
@ -56,7 +56,7 @@ class FtsTemplateAddTestCase(BaseTestGenerator):
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema.")
|
||||
|
||||
self.fts_template_name = "fts_temp_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_template_name = "fts_temp_%s" % str(uuid.uuid4())[1:8]
|
||||
self.data = \
|
||||
{
|
||||
"name": self.fts_template_name,
|
||||
|
@ -36,7 +36,7 @@ class FtsTemplateDeleteTestCase(BaseTestGenerator):
|
||||
self.server_id = self.schema_data['server_id']
|
||||
self.db_id = self.schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.fts_temp_name = "fts_temp_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_temp_name = "fts_temp_%s" % str(uuid.uuid4())[1:8]
|
||||
self.fts_temp_id = fts_temp_utils.create_fts_template(
|
||||
self.server,
|
||||
self.db_name,
|
||||
|
@ -36,7 +36,7 @@ class FtsTemplateGetTestCase(BaseTestGenerator):
|
||||
self.server_id = self.schema_data['server_id']
|
||||
self.db_id = self.schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.fts_temp_name = "fts_temp_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_temp_name = "fts_temp_%s" % str(uuid.uuid4())[1:8]
|
||||
self.fts_temp_id = fts_temp_utils.create_fts_template(
|
||||
self.server,
|
||||
self.db_name,
|
||||
|
@ -37,7 +37,7 @@ class FtsTemplatePutTestCase(BaseTestGenerator):
|
||||
self.server_id = self.schema_data['server_id']
|
||||
self.db_id = self.schema_data['db_id']
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.fts_temp_name = "fts_temp_%s" % str(uuid.uuid4())[1:4]
|
||||
self.fts_temp_name = "fts_temp_%s" % str(uuid.uuid4())[1:8]
|
||||
self.fts_temp_id = fts_temp_utils.create_fts_template(
|
||||
self.server,
|
||||
self.db_name,
|
||||
|
@ -95,7 +95,7 @@ class TriggerFuncAddTestCase(BaseTestGenerator):
|
||||
trigger_func_types = data['prorettypename'].split('/')
|
||||
for func_type in trigger_func_types:
|
||||
data['prorettypename'] = func_type
|
||||
data["name"] = "test_event_add_%s" % str(uuid.uuid4())[1:6]
|
||||
data["name"] = "test_event_add_%s" % str(uuid.uuid4())[1:8]
|
||||
if schema_id:
|
||||
data['pronamespace'] = schema_id
|
||||
else:
|
||||
|
@ -38,7 +38,7 @@ class TriggerFuncDeleteTestCase(BaseTestGenerator):
|
||||
schema_info = parent_node_dict["schema"][-1]
|
||||
server_id = schema_info["server_id"]
|
||||
db_id = schema_info["db_id"]
|
||||
func_name = "test_event_delete_%s" % str(uuid.uuid4())[1:6]
|
||||
func_name = "test_event_delete_%s" % str(uuid.uuid4())[1:8]
|
||||
server_con = server_utils.connect_server(self, server_id)
|
||||
if not server_con["info"] == "Server connected.":
|
||||
raise Exception("Could not connect to server to add resource "
|
||||
|
@ -38,7 +38,7 @@ class TriggerFuncGetTestCase(BaseTestGenerator):
|
||||
schema_info = parent_node_dict["schema"][-1]
|
||||
server_id = schema_info["server_id"]
|
||||
db_id = schema_info["db_id"]
|
||||
func_name = "test_event_get_%s" % str(uuid.uuid4())[1:6]
|
||||
func_name = "test_event_get_%s" % str(uuid.uuid4())[1:8]
|
||||
db_user = self.server["username"]
|
||||
server_con = server_utils.connect_server(self, server_id)
|
||||
if not server_con["info"] == "Server connected.":
|
||||
|
@ -39,7 +39,7 @@ class TriggerFuncPutTestCase(BaseTestGenerator):
|
||||
schema_info = parent_node_dict["schema"][-1]
|
||||
server_id = schema_info["server_id"]
|
||||
db_id = schema_info["db_id"]
|
||||
func_name = "test_event_put_%s" % str(uuid.uuid4())[1:6]
|
||||
func_name = "test_event_put_%s" % str(uuid.uuid4())[1:8]
|
||||
server_con = server_utils.connect_server(self, server_id)
|
||||
if not server_con["info"] == "Server connected.":
|
||||
raise Exception("Could not connect to server to add resource "
|
||||
|
@ -64,7 +64,7 @@ class PackageAddTestCase(BaseTestGenerator):
|
||||
|
||||
data = \
|
||||
{
|
||||
"name": "pkg_%s" % str(uuid.uuid4())[1:4],
|
||||
"name": "pkg_%s" % str(uuid.uuid4())[1:8],
|
||||
"owner": self.server["username"],
|
||||
"pkgacl": [],
|
||||
"pkgbodysrc": "PROCEDURE p1() is \n"
|
||||
|
@ -35,8 +35,8 @@ class PackageDeleteTestCase(BaseTestGenerator):
|
||||
self.schema_id = schema_info["schema_id"]
|
||||
self.schema_name = schema_info["schema_name"]
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.pkg_name= "pkg_%s" % str(uuid.uuid4())[1:4]
|
||||
self.proc_name = "proc_%s" % str(uuid.uuid4())[1:4]
|
||||
self.pkg_name= "pkg_%s" % str(uuid.uuid4())[1:8]
|
||||
self.proc_name = "proc_%s" % str(uuid.uuid4())[1:8]
|
||||
self.server_id = schema_info["server_id"]
|
||||
self.db_id = schema_info["db_id"]
|
||||
server_con = server_utils.connect_server(self, self.server_id)
|
||||
|
@ -35,8 +35,8 @@ class PackageGetTestCase(BaseTestGenerator):
|
||||
self.schema_id = schema_info["schema_id"]
|
||||
self.schema_name = schema_info["schema_name"]
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.pkg_name= "pkg_%s" % str(uuid.uuid4())[1:4]
|
||||
self.proc_name = "proc_%s" % str(uuid.uuid4())[1:4]
|
||||
self.pkg_name= "pkg_%s" % str(uuid.uuid4())[1:8]
|
||||
self.proc_name = "proc_%s" % str(uuid.uuid4())[1:8]
|
||||
self.server_id = schema_info["server_id"]
|
||||
self.db_id = schema_info["db_id"]
|
||||
server_con = server_utils.connect_server(self, self.server_id)
|
||||
|
@ -36,8 +36,8 @@ class PackagePutTestCase(BaseTestGenerator):
|
||||
self.schema_id = schema_info["schema_id"]
|
||||
self.schema_name = schema_info["schema_name"]
|
||||
self.db_name = parent_node_dict["database"][-1]["db_name"]
|
||||
self.pkg_name= "pkg_%s" % str(uuid.uuid4())[1:4]
|
||||
self.proc_name = "proc_%s" % str(uuid.uuid4())[1:4]
|
||||
self.pkg_name= "pkg_%s" % str(uuid.uuid4())[1:8]
|
||||
self.proc_name = "proc_%s" % str(uuid.uuid4())[1:8]
|
||||
self.server_id = schema_info["server_id"]
|
||||
self.db_id = schema_info["db_id"]
|
||||
server_con = server_utils.connect_server(self, self.server_id)
|
||||
|
@ -53,7 +53,7 @@ class SequenceAddTestCase(BaseTestGenerator):
|
||||
"increment": "1",
|
||||
"maximum": "100000",
|
||||
"minimum": "1",
|
||||
"name": "test_sequence_add_%s" % (str(uuid.uuid4())[1:6]),
|
||||
"name": "test_sequence_add_%s" % (str(uuid.uuid4())[1:8]),
|
||||
"relacl": [
|
||||
{
|
||||
"grantee": db_user,
|
||||
|
@ -42,7 +42,7 @@ class SequenceDeleteTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add sequence.")
|
||||
self.sequence_name = "test_sequence_delete_%s" % str(uuid.uuid4())[1:6]
|
||||
self.sequence_name = "test_sequence_delete_%s" % str(uuid.uuid4())[1:8]
|
||||
self.sequence_id = sequence_utils.create_sequences(
|
||||
self.server, self.db_name, self.schema_name, self.sequence_name)
|
||||
|
||||
|
@ -42,7 +42,7 @@ class SequenceGetTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add sequence.")
|
||||
self.sequence_name = "test_sequence_delete_%s" % str(uuid.uuid4())[1:6]
|
||||
self.sequence_name = "test_sequence_delete_%s" % str(uuid.uuid4())[1:8]
|
||||
self.sequence_id = sequence_utils.create_sequences(
|
||||
self.server, self.db_name, self.schema_name, self.sequence_name)
|
||||
|
||||
|
@ -43,7 +43,7 @@ class SequencePutTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add sequence.")
|
||||
self.sequence_name = "test_sequence_delete_%s" % str(uuid.uuid4())[1:6]
|
||||
self.sequence_name = "test_sequence_delete_%s" % str(uuid.uuid4())[1:8]
|
||||
self.sequence_id = sequence_utils.create_sequences(
|
||||
self.server, self.db_name, self.schema_name, self.sequence_name)
|
||||
|
||||
|
@ -53,7 +53,7 @@ class SynonymAddTestCase(BaseTestGenerator):
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add the synonym.")
|
||||
self.sequence_name = "test_sequence_synonym_%s" % \
|
||||
str(uuid.uuid4())[1:6]
|
||||
str(uuid.uuid4())[1:8]
|
||||
self.sequence_id = sequence_utils.create_sequences(
|
||||
self.server, self.db_name, self.schema_name, self.sequence_name)
|
||||
|
||||
@ -68,7 +68,7 @@ class SynonymAddTestCase(BaseTestGenerator):
|
||||
"synobjname": self.sequence_name,
|
||||
"synobjschema": self.schema_name,
|
||||
"targettype": "Sequence",
|
||||
"name": "synonym_add_%s" % (str(uuid.uuid4())[1:6])
|
||||
"name": "synonym_add_%s" % (str(uuid.uuid4())[1:8])
|
||||
}
|
||||
|
||||
response = self.tester.post(
|
||||
|
@ -53,10 +53,10 @@ class SynonymDeleteTestCase(BaseTestGenerator):
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add the synonym.")
|
||||
self.sequence_name = "test_sequence_synonym_%s" % \
|
||||
str(uuid.uuid4())[1:6]
|
||||
str(uuid.uuid4())[1:8]
|
||||
self.sequence_id = sequence_utils.create_sequences(
|
||||
self.server, self.db_name, self.schema_name, self.sequence_name)
|
||||
self.synonym_name = "test_synonym_delete_%s" % str(uuid.uuid4())[1:6]
|
||||
self.synonym_name = "test_synonym_delete_%s" % str(uuid.uuid4())[1:8]
|
||||
synonym_utils.create_synonym(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
|
@ -53,10 +53,10 @@ class SynonymGetTestCase(BaseTestGenerator):
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add the synonym.")
|
||||
self.sequence_name = "test_sequence_synonym_%s" % \
|
||||
str(uuid.uuid4())[1:6]
|
||||
str(uuid.uuid4())[1:8]
|
||||
self.sequence_id = sequence_utils.create_sequences(
|
||||
self.server, self.db_name, self.schema_name, self.sequence_name)
|
||||
self.synonym_name = "test_synonym_get_%s" % str(uuid.uuid4())[1:6]
|
||||
self.synonym_name = "test_synonym_get_%s" % str(uuid.uuid4())[1:8]
|
||||
synonym_utils.create_synonym(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
|
@ -61,10 +61,10 @@ class SynonymPutTestCase(BaseTestGenerator):
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add the synonym.")
|
||||
self.sequence_name = "test_sequence_synonym_%s" % \
|
||||
str(uuid.uuid4())[1:6]
|
||||
str(uuid.uuid4())[1:8]
|
||||
self.sequence_id = sequence_utils.create_sequences(
|
||||
self.server, self.db_name, self.schema_name, self.sequence_name)
|
||||
self.synonym_name = "test_synonym_put_%s" % str(uuid.uuid4())[1:6]
|
||||
self.synonym_name = "test_synonym_put_%s" % str(uuid.uuid4())[1:8]
|
||||
synonym_utils.create_synonym(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
@ -79,7 +79,7 @@ class SynonymPutTestCase(BaseTestGenerator):
|
||||
self.synonym_name)
|
||||
if not synonym_response:
|
||||
raise Exception("No synonym node to update.")
|
||||
func_name = "test_function_synonym_%s" % str(uuid.uuid4())[1:6]
|
||||
func_name = "test_function_synonym_%s" % str(uuid.uuid4())[1:8]
|
||||
self.table_id = functions_utils.create_trigger_function(
|
||||
self.server, self.db_name, self.schema_name, func_name,
|
||||
self.server_version)
|
||||
|
@ -43,14 +43,14 @@ class ColumnAddTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add a table.")
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
|
||||
def runTest(self):
|
||||
"""This function will add column under table node."""
|
||||
self.column_name = "test_column_add_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.column_name = "test_column_add_%s" % (str(uuid.uuid4())[1:8])
|
||||
data = {"name": self.column_name,
|
||||
"cltype": "\"char\"",
|
||||
"attacl": [],
|
||||
|
@ -43,11 +43,11 @@ class ColumnDeleteTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add a table.")
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.column_id = columns_utils.create_column(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
|
@ -43,11 +43,11 @@ class ColumnGetTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add a table.")
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.column_id = columns_utils.create_column(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
|
@ -44,11 +44,11 @@ class ColumnPutTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add a table.")
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.column_name = "test_column_put_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.column_name = "test_column_put_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.column_id = columns_utils.create_column(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
|
@ -47,7 +47,7 @@ class CheckConstraintAddTestCase(BaseTestGenerator):
|
||||
raise Exception("Could not find the schema to add a check "
|
||||
"constraint.")
|
||||
self.table_name = "table_checkconstraint_add_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
@ -56,7 +56,7 @@ class CheckConstraintAddTestCase(BaseTestGenerator):
|
||||
def runTest(self):
|
||||
"""This function will add check constraint to table."""
|
||||
check_constraint_name = "test_checkconstraint_add_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
data = {"name": check_constraint_name,
|
||||
"consrc": " (id > 0)",
|
||||
"convalidated": True,
|
||||
|
@ -47,13 +47,13 @@ class CheckConstraintDeleteTestCase(BaseTestGenerator):
|
||||
raise Exception("Could not find the schema to delete a check "
|
||||
"constraint.")
|
||||
self.table_name = "table_checkconstraint_delete_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.check_constraint_name = "test_checkconstraint_delete_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.check_constraint_id = \
|
||||
chk_constraint_utils.create_check_constraint(
|
||||
self.server, self.db_name, self.schema_name, self.table_name,
|
||||
|
@ -47,13 +47,13 @@ class CheckConstraintGetTestCase(BaseTestGenerator):
|
||||
raise Exception("Could not find the schema to fetch a check "
|
||||
"constraint.")
|
||||
self.table_name = "table_checkconstraint_get_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.check_constraint_name = "test_checkconstraint_get_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.check_constraint_id = \
|
||||
chk_constraint_utils.create_check_constraint(
|
||||
self.server, self.db_name, self.schema_name, self.table_name,
|
||||
|
@ -48,13 +48,13 @@ class CheckConstraintPutTestCase(BaseTestGenerator):
|
||||
raise Exception("Could not find the schema to update a check "
|
||||
"constraint.")
|
||||
self.table_name = "table_checkconstraint_put_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.check_constraint_name = "test_checkconstraint_put_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.check_constraint_id = \
|
||||
chk_constraint_utils.create_check_constraint(
|
||||
self.server, self.db_name, self.schema_name, self.table_name,
|
||||
|
@ -47,13 +47,13 @@ class ForeignKeyAddTestCase(BaseTestGenerator):
|
||||
raise Exception("Could not find the schema to add a foreign "
|
||||
"key constraint.")
|
||||
self.local_table_name = "table_foreignkey_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.local_table_id = tables_utils.create_table(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
self.local_table_name)
|
||||
self.foreign_table_name = "table_foreignkey_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.foreign_table_id = tables_utils.create_table(
|
||||
self.server, self.db_name, self.schema_name,
|
||||
self.foreign_table_name)
|
||||
@ -61,7 +61,7 @@ class ForeignKeyAddTestCase(BaseTestGenerator):
|
||||
def runTest(self):
|
||||
"""This function will add foreign key table column."""
|
||||
foreignkey_name = "test_foreignkey_add_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
data = {"name": foreignkey_name,
|
||||
"columns": [{"local_column": "id",
|
||||
"references": self.foreign_table_id,
|
||||
|
@ -48,16 +48,16 @@ class ForeignKeyDeleteTestCase(BaseTestGenerator):
|
||||
raise Exception("Could not find the schema to delete a foreign "
|
||||
"key constraint.")
|
||||
self.local_table_name = "local_table_foreignkey_delete_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.local_table_id = tables_utils.create_table(
|
||||
self.server, self.db_name, self.schema_name, self.local_table_name)
|
||||
self.foreign_table_name = "foreign_table_foreignkey_delete_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.foreign_table_id = tables_utils.create_table(
|
||||
self.server, self.db_name, self.schema_name,
|
||||
self.foreign_table_name)
|
||||
self.foreign_key_name = "test_foreignkey_delete_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.foreign_key_id = fk_utils.create_foreignkey(
|
||||
self.server, self.db_name, self.schema_name, self.local_table_name,
|
||||
self.foreign_table_name)
|
||||
|
@ -48,16 +48,16 @@ class ForeignGetDeleteTestCase(BaseTestGenerator):
|
||||
raise Exception("Could not find the schema to fetch a foreign "
|
||||
"key constraint.")
|
||||
self.local_table_name = "local_table_foreignkey_get_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.local_table_id = tables_utils.create_table(
|
||||
self.server, self.db_name, self.schema_name, self.local_table_name)
|
||||
self.foreign_table_name = "foreign_table_foreignkey_get_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.foreign_table_id = tables_utils.create_table(
|
||||
self.server, self.db_name, self.schema_name,
|
||||
self.foreign_table_name)
|
||||
self.foreign_key_name = "test_foreignkey_get_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.foreign_key_id = fk_utils.create_foreignkey(
|
||||
self.server, self.db_name, self.schema_name, self.local_table_name,
|
||||
self.foreign_table_name)
|
||||
|
@ -49,16 +49,16 @@ class ForeignPutDeleteTestCase(BaseTestGenerator):
|
||||
raise Exception("Could not find the schema to fetch a foreign "
|
||||
"key constraint.")
|
||||
self.local_table_name = "local_table_foreignkey_get_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.local_table_id = tables_utils.create_table(
|
||||
self.server, self.db_name, self.schema_name, self.local_table_name)
|
||||
self.foreign_table_name = "foreign_table_foreignkey_get_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.foreign_table_id = tables_utils.create_table(
|
||||
self.server, self.db_name, self.schema_name,
|
||||
self.foreign_table_name)
|
||||
self.foreign_key_name = "test_foreignkey_get_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
self.foreign_key_id = fk_utils.create_foreignkey(
|
||||
self.server, self.db_name, self.schema_name, self.local_table_name,
|
||||
self.foreign_table_name)
|
||||
|
@ -25,13 +25,13 @@ class IndexConstraintAddTestCase(BaseTestGenerator):
|
||||
"""This class will add index constraint(primary key or unique key) to
|
||||
table column"""
|
||||
primary_key_name = "test_primarykey_add_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
primary_key_data = {"name": primary_key_name,
|
||||
"spcname": "pg_default",
|
||||
"columns": [{"column": "id"}]
|
||||
}
|
||||
unique_key_name = "test_uniquekey_add_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
unique_key_data = {"name": unique_key_name,
|
||||
"spcname": "pg_default",
|
||||
"columns": [{"column": "id"}]}
|
||||
@ -62,7 +62,7 @@ class IndexConstraintAddTestCase(BaseTestGenerator):
|
||||
raise Exception("Could not find the schema to add a index "
|
||||
"constraint(primary key or unique key).")
|
||||
cls.table_name = "table_indexconstraint_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
cls.table_id = tables_utils.create_table(cls.server,
|
||||
cls.db_name,
|
||||
cls.schema_name,
|
||||
|
@ -25,9 +25,9 @@ class IndexConstraintDeleteTestCase(BaseTestGenerator):
|
||||
"""This class will delete index constraint(primary key or unique key) of
|
||||
table column"""
|
||||
primary_key_name = "test_primarykey_delete_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
unique_key_name = "test_uniquekey_delete_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
scenarios = [
|
||||
('Delete primary Key constraint of table',
|
||||
dict(url='/browser/primary_key/obj/', name=primary_key_name,
|
||||
@ -57,7 +57,7 @@ class IndexConstraintDeleteTestCase(BaseTestGenerator):
|
||||
raise Exception("Could not find the schema to add a index "
|
||||
"constraint(primary key or unique key).")
|
||||
cls.table_name = "table_indexconstraint_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
cls.table_id = tables_utils.create_table(cls.server,
|
||||
cls.db_name,
|
||||
cls.schema_name,
|
||||
|
@ -25,9 +25,9 @@ class IndexConstraintGetTestCase(BaseTestGenerator):
|
||||
"""This class will fetch the index constraint(primary key or unique key) of
|
||||
table column"""
|
||||
primary_key_name = "test_primarykey_delete_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
unique_key_name = "test_uniquekey_delete_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
scenarios = [
|
||||
('Fetch primary Key constraint of table',
|
||||
dict(url='/browser/primary_key/obj/', name=primary_key_name,
|
||||
@ -57,7 +57,7 @@ class IndexConstraintGetTestCase(BaseTestGenerator):
|
||||
raise Exception("Could not find the schema to add a index "
|
||||
"constraint(primary key or unique key).")
|
||||
cls.table_name = "table_indexconstraint_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
cls.table_id = tables_utils.create_table(cls.server,
|
||||
cls.db_name,
|
||||
cls.schema_name,
|
||||
|
@ -26,9 +26,9 @@ class IndexConstraintUpdateTestCase(BaseTestGenerator):
|
||||
"""This class will update index constraint(primary key or unique key) of
|
||||
table column"""
|
||||
primary_key_name = "test_primarykey_put_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
unique_key_name = "test_uniquekey_put_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
data = {"oid": "", "comment": "this is test comment"}
|
||||
scenarios = [
|
||||
('Update primary Key constraint of table',
|
||||
@ -59,7 +59,7 @@ class IndexConstraintUpdateTestCase(BaseTestGenerator):
|
||||
raise Exception("Could not find the schema to add a index "
|
||||
"constraint(primary key or unique key).")
|
||||
cls.table_name = "table_indexconstraint_%s" % \
|
||||
(str(uuid.uuid4())[1:6])
|
||||
(str(uuid.uuid4())[1:8])
|
||||
cls.table_id = tables_utils.create_table(cls.server,
|
||||
cls.db_name,
|
||||
cls.schema_name,
|
||||
|
@ -43,14 +43,14 @@ class IndexesAddTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add a table.")
|
||||
self.table_name = "table_for_column_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_for_column_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
|
||||
def runTest(self):
|
||||
"""This function will add index to existing table column."""
|
||||
self.index_name = "test_index_add_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.index_name = "test_index_add_%s" % (str(uuid.uuid4())[1:8])
|
||||
data = {"name": self.index_name,
|
||||
"spcname": "pg_default",
|
||||
"amname": "btree",
|
||||
|
@ -45,17 +45,17 @@ class IndexesDeleteTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add a table.")
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.column_id = columns_utils.create_column(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name,
|
||||
self.column_name)
|
||||
self.index_name = "test_index_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.index_name = "test_index_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.index_id = indexes_utils.create_index(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name,
|
||||
|
@ -45,17 +45,17 @@ class IndexesGetTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add a table.")
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.column_id = columns_utils.create_column(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name,
|
||||
self.column_name)
|
||||
self.index_name = "test_index_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.index_name = "test_index_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.index_id = indexes_utils.create_index(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name,
|
||||
|
@ -46,17 +46,17 @@ class IndexesUpdateTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add a table.")
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.column_id = columns_utils.create_column(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name,
|
||||
self.column_name)
|
||||
self.index_name = "test_index_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.index_name = "test_index_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.index_id = indexes_utils.create_index(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name,
|
||||
|
@ -43,14 +43,14 @@ class RulesAddTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add a rule.")
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
|
||||
def runTest(self):
|
||||
"""This function will rule under table node."""
|
||||
rule_name = "test_rule_add_%s" % (str(uuid.uuid4())[1:6])
|
||||
rule_name = "test_rule_add_%s" % (str(uuid.uuid4())[1:8])
|
||||
data = {"schema": self.schema_name,
|
||||
"view": self.table_name,
|
||||
"name": rule_name,
|
||||
|
@ -43,11 +43,11 @@ class RulesDeleteTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to delete rule.")
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.rule_name = "test_rule_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.rule_name = "test_rule_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.rule_id = rules_utils.create_rule(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name,
|
||||
|
@ -43,11 +43,11 @@ class RulesGetTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to delete rule.")
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.rule_name = "test_rule_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.rule_name = "test_rule_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.rule_id = rules_utils.create_rule(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name,
|
||||
|
@ -44,11 +44,11 @@ class RulesUpdateTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to delete rule.")
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.rule_name = "test_rule_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.rule_name = "test_rule_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.rule_id = rules_utils.create_rule(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name,
|
||||
|
@ -72,7 +72,7 @@ class TableAddTestCase(BaseTestGenerator):
|
||||
def runTest(self):
|
||||
""" This function will add table under schema node. """
|
||||
db_user = self.server["username"]
|
||||
self.table_name = "test_table_add_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "test_table_add_%s" % (str(uuid.uuid4())[1:8])
|
||||
data = {
|
||||
"check_constraint": [],
|
||||
"coll_inherits": "[]",
|
||||
|
@ -42,7 +42,7 @@ class TableDeleteTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add a table.")
|
||||
self.table_name = "test_table_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "test_table_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
|
@ -42,7 +42,7 @@ class TableGetTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add a table.")
|
||||
self.table_name = "test_table_get_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "test_table_get_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
|
@ -86,7 +86,7 @@ class TableUpdateTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add a table.")
|
||||
self.table_name = "test_table_put_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "test_table_put_%s" % (str(uuid.uuid4())[1:8])
|
||||
|
||||
self.is_partition = False
|
||||
if hasattr(self, 'server_min_version'):
|
||||
|
@ -45,18 +45,18 @@ class TriggersAddTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to add a trigger.")
|
||||
self.table_name = "table_trigger_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_trigger_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.func_name = "trigger_func_add_%s" % str(uuid.uuid4())[1:6]
|
||||
self.func_name = "trigger_func_add_%s" % str(uuid.uuid4())[1:8]
|
||||
self.function_info = \
|
||||
trigger_funcs_utils.create_trigger_function_with_trigger(
|
||||
self.server, self.db_name, self.schema_name, self.func_name)
|
||||
|
||||
def runTest(self):
|
||||
"""This function will trigger under table node."""
|
||||
trigger_name = "test_trigger_add_%s" % (str(uuid.uuid4())[1:6])
|
||||
trigger_name = "test_trigger_add_%s" % (str(uuid.uuid4())[1:8])
|
||||
data = {"name": trigger_name,
|
||||
"is_row_trigger": True,
|
||||
"fires": "BEFORE",
|
||||
|
@ -45,15 +45,15 @@ class TriggersDeleteTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to delete trigger.")
|
||||
self.table_name = "table_trigger_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_trigger_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.func_name = "trigger_func_delete_%s" % str(uuid.uuid4())[1:6]
|
||||
self.func_name = "trigger_func_delete_%s" % str(uuid.uuid4())[1:8]
|
||||
self.function_info = \
|
||||
trigger_funcs_utils.create_trigger_function_with_trigger(
|
||||
self.server, self.db_name, self.schema_name, self.func_name)
|
||||
self.trigger_name = "test_trigger_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.trigger_name = "test_trigger_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.trigger_id = triggers_utils.create_trigger(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
|
@ -45,15 +45,15 @@ class TriggersGetTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to get a trigger.")
|
||||
self.table_name = "table_trigger_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_trigger_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.func_name = "trigger_func_get_%s" % str(uuid.uuid4())[1:6]
|
||||
self.func_name = "trigger_func_get_%s" % str(uuid.uuid4())[1:8]
|
||||
self.function_info = \
|
||||
trigger_funcs_utils.create_trigger_function_with_trigger(
|
||||
self.server, self.db_name, self.schema_name, self.func_name)
|
||||
self.trigger_name = "test_trigger_get_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.trigger_name = "test_trigger_get_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.trigger_id = triggers_utils.create_trigger(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
|
@ -47,15 +47,15 @@ class TriggersUpdateTestCase(BaseTestGenerator):
|
||||
self.schema_name)
|
||||
if not schema_response:
|
||||
raise Exception("Could not find the schema to update a trigger.")
|
||||
self.table_name = "table_trigger_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.table_name = "table_trigger_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.table_id = tables_utils.create_table(self.server, self.db_name,
|
||||
self.schema_name,
|
||||
self.table_name)
|
||||
self.func_name = "trigger_func_add_%s" % str(uuid.uuid4())[1:6]
|
||||
self.func_name = "trigger_func_add_%s" % str(uuid.uuid4())[1:8]
|
||||
self.function_info = \
|
||||
trigger_funcs_utils.create_trigger_function_with_trigger(
|
||||
self.server, self.db_name, self.schema_name, self.func_name)
|
||||
self.trigger_name = "test_trigger_delete_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.trigger_name = "test_trigger_delete_%s" % (str(uuid.uuid4())[1:8])
|
||||
self.trigger_id = triggers_utils.create_trigger(self.server,
|
||||
self.db_name,
|
||||
self.schema_name,
|
||||
|
@ -42,7 +42,7 @@ class SchemaAddTestCase(BaseTestGenerator):
|
||||
"defseqacl": [],
|
||||
"deftblacl": [],
|
||||
"deftypeacl": [],
|
||||
"name": "test_schema_{0}".format(str(uuid.uuid4())[1:6]),
|
||||
"name": "test_schema_{0}".format(str(uuid.uuid4())[1:8]),
|
||||
"namespaceowner": db_user,
|
||||
"nspacl": [
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ class SchemaDeleteTestCase(BaseTestGenerator):
|
||||
self.database_info = parent_node_dict["database"][-1]
|
||||
self.db_name = self.database_info["db_name"]
|
||||
# Change the db name, so that schema will create in newly created db
|
||||
self.schema_name = "schema_get_%s" % str(uuid.uuid4())[1:6]
|
||||
self.schema_name = "schema_get_%s" % str(uuid.uuid4())[1:8]
|
||||
connection = utils.get_db_connection(self.db_name,
|
||||
self.server['username'],
|
||||
self.server['db_password'],
|
||||
|
@ -29,7 +29,7 @@ class SchemaPutTestCase(BaseTestGenerator):
|
||||
self.database_info = parent_node_dict["database"][-1]
|
||||
self.db_name = self.database_info["db_name"]
|
||||
# Change the db name, so that schema will create in newly created db
|
||||
self.schema_name = "schema_get_%s" % str(uuid.uuid4())[1:6]
|
||||
self.schema_name = "schema_get_%s" % str(uuid.uuid4())[1:8]
|
||||
connection = utils.get_db_connection(self.db_name,
|
||||
self.server['username'],
|
||||
self.server['db_password'],
|
||||
|
@ -45,7 +45,7 @@ class TypesAddTestCase(BaseTestGenerator):
|
||||
def runTest(self):
|
||||
""" This function will add type under schema node. """
|
||||
db_user = self.server["username"]
|
||||
self.type_name = "test_type_add_%s" % (str(uuid.uuid4())[1:6])
|
||||
self.type_name = "test_type_add_%s" % (str(uuid.uuid4())[1:8])
|
||||
data = {"name": self.type_name,
|
||||
"is_sys_type": False,
|
||||
"typtype": "c",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user