mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Use unique database name in ERD API test cases.
This commit is contained in:
parent
db1eb75298
commit
ee679e39e5
@ -7,8 +7,7 @@
|
|||||||
#
|
#
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
import json
|
import uuid
|
||||||
|
|
||||||
from pgadmin.utils.route import BaseTestGenerator
|
from pgadmin.utils.route import BaseTestGenerator
|
||||||
from regression.python_test_utils import test_utils as utils
|
from regression.python_test_utils import test_utils as utils
|
||||||
from regression import parent_node_dict
|
from regression import parent_node_dict
|
||||||
@ -20,7 +19,7 @@ from pgadmin.browser.server_groups.servers.databases.tests import utils as \
|
|||||||
class ERDClose(BaseTestGenerator):
|
class ERDClose(BaseTestGenerator):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.db_name = "erdtestdb"
|
self.db_name = "erdtestdb_{0}".format(str(uuid.uuid4())[1:8])
|
||||||
self.sid = parent_node_dict["server"][-1]["server_id"]
|
self.sid = parent_node_dict["server"][-1]["server_id"]
|
||||||
self.did = utils.create_database(self.server, self.db_name)
|
self.did = utils.create_database(self.server, self.db_name)
|
||||||
self.sgid = config_data["server_group"]
|
self.sgid = config_data["server_group"]
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import uuid
|
||||||
from pgadmin.utils.route import BaseTestGenerator
|
from pgadmin.utils.route import BaseTestGenerator
|
||||||
from regression.python_test_utils import test_utils as utils
|
from regression.python_test_utils import test_utils as utils
|
||||||
from regression import parent_node_dict
|
from regression import parent_node_dict
|
||||||
@ -20,7 +20,7 @@ from pgadmin.browser.server_groups.servers.databases.tests import utils as \
|
|||||||
class ERDInitialize(BaseTestGenerator):
|
class ERDInitialize(BaseTestGenerator):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.db_name = "erdtestdb"
|
self.db_name = "erdtestdb_{0}".format(str(uuid.uuid4())[1:8])
|
||||||
self.sid = parent_node_dict["server"][-1]["server_id"]
|
self.sid = parent_node_dict["server"][-1]["server_id"]
|
||||||
self.did = utils.create_database(self.server, self.db_name)
|
self.did = utils.create_database(self.server, self.db_name)
|
||||||
self.sgid = config_data["server_group"]
|
self.sgid = config_data["server_group"]
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
#
|
#
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
import json
|
import uuid
|
||||||
|
|
||||||
from pgadmin.utils.route import BaseTestGenerator
|
from pgadmin.utils.route import BaseTestGenerator
|
||||||
from regression.python_test_utils import test_utils as utils
|
from regression.python_test_utils import test_utils as utils
|
||||||
from regression import parent_node_dict
|
from regression import parent_node_dict
|
||||||
@ -20,7 +19,7 @@ from pgadmin.browser.server_groups.servers.databases.tests import utils as \
|
|||||||
class ERDPanel(BaseTestGenerator):
|
class ERDPanel(BaseTestGenerator):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.db_name = "erdtestdb"
|
self.db_name = "erdtestdb_{0}".format(str(uuid.uuid4())[1:8])
|
||||||
self.sid = parent_node_dict["server"][-1]["server_id"]
|
self.sid = parent_node_dict["server"][-1]["server_id"]
|
||||||
self.did = utils.create_database(self.server, self.db_name)
|
self.did = utils.create_database(self.server, self.db_name)
|
||||||
self.sgid = config_data["server_group"]
|
self.sgid = config_data["server_group"]
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import uuid
|
||||||
from pgadmin.utils.route import BaseTestGenerator
|
from pgadmin.utils.route import BaseTestGenerator
|
||||||
from regression.python_test_utils import test_utils as utils
|
from regression.python_test_utils import test_utils as utils
|
||||||
from regression import parent_node_dict
|
from regression import parent_node_dict
|
||||||
@ -20,7 +20,7 @@ from pgadmin.browser.server_groups.servers.databases.tests import utils as \
|
|||||||
class ERDPrequisite(BaseTestGenerator):
|
class ERDPrequisite(BaseTestGenerator):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.db_name = "erdtestdb"
|
self.db_name = "erdtestdb_{0}".format(str(uuid.uuid4())[1:8])
|
||||||
self.sid = parent_node_dict["server"][-1]["server_id"]
|
self.sid = parent_node_dict["server"][-1]["server_id"]
|
||||||
self.did = utils.create_database(self.server, self.db_name)
|
self.did = utils.create_database(self.server, self.db_name)
|
||||||
self.sgid = config_data["server_group"]
|
self.sgid = config_data["server_group"]
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import uuid
|
||||||
from pgadmin.utils.route import BaseTestGenerator
|
from pgadmin.utils.route import BaseTestGenerator
|
||||||
from regression.python_test_utils import test_utils as utils
|
from regression.python_test_utils import test_utils as utils
|
||||||
from regression import parent_node_dict
|
from regression import parent_node_dict
|
||||||
@ -23,7 +23,7 @@ from os import path
|
|||||||
class ERDSql(BaseTestGenerator):
|
class ERDSql(BaseTestGenerator):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.db_name = "erdtestdb"
|
self.db_name = "erdtestdb_{0}".format(str(uuid.uuid4())[1:8])
|
||||||
self.sid = parent_node_dict["server"][-1]["server_id"]
|
self.sid = parent_node_dict["server"][-1]["server_id"]
|
||||||
self.did = utils.create_database(self.server, self.db_name)
|
self.did = utils.create_database(self.server, self.db_name)
|
||||||
self.sgid = config_data["server_group"]
|
self.sgid = config_data["server_group"]
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from pgadmin.utils.route import BaseTestGenerator
|
from pgadmin.utils.route import BaseTestGenerator
|
||||||
from regression.python_test_utils import test_utils as utils
|
from regression.python_test_utils import test_utils as utils
|
||||||
from regression import parent_node_dict
|
from regression import parent_node_dict
|
||||||
@ -33,7 +32,7 @@ class ERDTables(BaseTestGenerator):
|
|||||||
utils.drop_database(connection, self.db_name)
|
utils.drop_database(connection, self.db_name)
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.db_name = "erdtestdb"
|
self.db_name = "erdtestdb_{0}".format(str(uuid.uuid4())[1:8])
|
||||||
self.sid = parent_node_dict["server"][-1]["server_id"]
|
self.sid = parent_node_dict["server"][-1]["server_id"]
|
||||||
self.did = utils.create_database(self.server, self.db_name)
|
self.did = utils.create_database(self.server, self.db_name)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user