Esempio n. 1
0
    def setUp(self):
        cfg.reset_test_data()
        utils_ca.reset_sql_db(test_project_name)
        utils_ca.reset_ftp(test_project_name)

        if not os.path.exists(cli_project_path):
            os.makedirs(cli_project_path)
        os.chdir(cli_project_path)

        self.cnx = Connection(adapter="mysql",
                              host=utils_ca.mysql_settings['host'],
                              username=utils_ca.mysql_settings['username'],
                              password=utils_ca.mysql_settings['password'],
                              port=utils_ca.mysql_settings['port'])

        self.cnx.add_repository(name="ftp_storage",
                                adapter="ftp",
                                login=utils_ca.ftp_login,
                                password=utils_ca.ftp_password,
                                host=utils_ca.ftp_settings["host"],
                                port=utils_ca.ftp_settings["port"],
                                root=utils_ca.ftp_settings["root"])

        self.prj = self.cnx.create_project(
            test_project_name,
            cfg.sandbox_work_path,
            default_repository="ftp_storage",
            product_user_root=cfg.sandbox_products_path)

        self.db_url = "mysql://" + utils_ca.mysql_settings["username"] + ':' + utils_ca.mysql_settings["password"] +\
                      '@' + utils_ca.mysql_settings["host"] + ':' + utils_ca.mysql_settings["port"]
Esempio n. 2
0
 def setUp(self):
     utils.reset_test_data()
     self.cnx = Connection(adapter="json_db", path=utils.json_db_path)
     self.cnx.add_repository(name="main_storage",
                             adapter="file_storage",
                             path=utils.file_storage_path)
     self.prj = self.cnx.create_project(
         test_project_name,
         utils.sandbox_work_path,
         default_repository="main_storage",
         product_user_root=utils.sandbox_products_path)
     self._initResource()
Esempio n. 3
0
 def setUp(self):
     utils.reset_test_data()
     utils_ca.reset_ftp(test_project_name)
     self.cnx = Connection(adapter="json_db", path=utils.json_db_path)
     self.cnx.add_repository(name="ftp_storage",
                             adapter="ftp",
                             login=utils_ca.ftp_login,
                             password=utils_ca.ftp_password,
                             host=utils_ca.ftp_settings["host"],
                             port=utils_ca.ftp_settings["port"],
                             root=utils_ca.ftp_settings["root"])
     self.prj = self.cnx.create_project(
         test_project_name,
         utils.sandbox_work_path,
         default_repository="ftp_storage",
         product_user_root=utils.sandbox_products_path)
Esempio n. 4
0
    def setUp(self):
        cfg.reset_test_data()
        if not os.path.exists(cli_project_path):
            os.makedirs(cli_project_path)
        os.chdir(cli_project_path)

        # project and repository management are not supported via CLI. use api here
        self.cnx = Connection(adapter="json_db", path=cfg.json_db_path)
        self.cnx.add_repository(name="local_test_storage",
                                adapter="file_storage",
                                path=cfg.file_storage_path)
        self.prj = self.cnx.create_project(
            test_project_name,
            cfg.sandbox_work_path,
            default_repository="local_test_storage",
            product_user_root=cfg.sandbox_products_path)
Esempio n. 5
0
 def setUp(self):
     utils.reset_test_data()
     utils_ca.reset_sql_db(test_project_name)
     self.cnx = Connection(adapter="mysql",
                           host=utils_ca.mysql_settings['host'],
                           username=utils_ca.mysql_settings['username'],
                           password=utils_ca.mysql_settings['password'],
                           port=utils_ca.mysql_settings['port'])
     self.cnx.add_repository(name="main_storage",
                             adapter="file_storage",
                             path=utils.file_storage_path)
     self.prj = self.cnx.create_project(
         test_project_name,
         utils.sandbox_work_path,
         default_repository="main_storage",
         product_user_root=utils.sandbox_products_path)
     self._initResource()
Esempio n. 6
0
 def setUp(self):
     utils.reset_test_data()
     self.cnx = Connection(adapter="json_db", path=utils.json_db_path)
     self.cnx.add_repository(name="local_test_storage",
                             adapter="file_storage",
                             path=utils.file_storage_path)