Ejemplo n.º 1
0
    def testSimpleGroupMigration(self):

        # Clear out previous projects.
        for project in api_base.entity_get_all(Project):
            api_base.entity_hard_delete(Project, project.id)

        projects_loader.do_load_models('./etc/projects.yaml.sample')

        all_groups = api_base.entity_get_all(ProjectGroup)
        all_projects = api_base.entity_get_all(Project)
        self.assertEqual(3, len(all_groups))
        self.assertEqual(2, len(all_projects))

        for project in all_projects:
            branches = api_base.entity_get_count(Branch,
                                                 project_id=project.id,
                                                 name='master')
            self.assertEqual(1, branches)
    def testSimpleGroupMigration(self):

        # Clear out previous projects.
        for project in api_base.entity_get_all(Project):
            api_base.entity_hard_delete(Project, project.id)

        projects_loader.do_load_models('./etc/projects.yaml.sample')

        all_groups = api_base.entity_get_all(ProjectGroup)
        all_projects = api_base.entity_get_all(Project)
        self.assertEqual(3, len(all_groups))
        self.assertEqual(2, len(all_projects))

        for project in all_projects:
            branches = api_base.entity_get_count(Branch,
                                                 project_id=project.id,
                                                 name='master')
            self.assertEqual(1, branches)
Ejemplo n.º 3
0
def do_load_projects(config, cmd):
    projects_loader.do_load_models(CONF.command.file)
Ejemplo n.º 4
0
def do_load_projects(config, cmd):
    projects_loader.do_load_models(CONF.command.file)