Beispiel #1
0
    def setUp(self):
        super(UpdateTest, self).setUp()

        ensure_environment(self.settings, 'production', 'master')
        ensure_environment(self.settings, 'qa', 'qa')

        init_repositories(self.settings)
        (bare, user) = create_fake_repository(self.settings, self.sandbox_path, ['qa'])
        add_repository(self.settings, 'common', 'site', bare)
        (bare, user) = create_fake_repository(self.settings, self.sandbox_path, ['qa'])
        add_repository(self.settings, 'common', 'hieradata', bare)

        self.lock = JensLockFactory.makeLock(self.settings)
Beispiel #2
0
    def setUp(self):
        super(UpdateTest, self).setUp()

        ensure_environment(self.settings, 'production', 'master')
        ensure_environment(self.settings, 'qa', 'qa')

        init_repositories(self.settings)
        (bare, user) = create_fake_repository(self.settings, self.sandbox_path, ['qa'])
        add_repository(self.settings, 'common', 'site', bare)
        (bare, user) = create_fake_repository(self.settings, self.sandbox_path, ['qa'])
        add_repository(self.settings, 'common', 'hieradata', bare)

        self.lock = JensLockFactory.makeLock(self.settings)
Beispiel #3
0
    def setUp(self):
        super(MetadataTest, self).setUp()

        (self.environments_bare, self.environments) = \
            create_fake_repository(self.settings, self.sandbox_path)
        shutil.rmtree(self.settings.ENV_METADATADIR)
        clone(self.settings.ENV_METADATADIR, self.environments_bare, \
            branch='master')

        (self.repositories_bare, self.repositories) = \
            create_fake_repository(self.settings, self.sandbox_path)
        shutil.rmtree(self.settings.REPO_METADATADIR)
        clone(self.settings.REPO_METADATADIR, self.repositories_bare, \
            branch='master')
Beispiel #4
0
    def setUp(self):
        super(MetadataTest, self).setUp()

        (self.environments_bare, self.environments) = \
            create_fake_repository(self.settings, self.sandbox_path)
        shutil.rmtree(self.settings.ENV_METADATADIR)
        clone(self.settings.ENV_METADATADIR, self.environments_bare, \
            branch='master')

        (self.repositories_bare, self.repositories) = \
            create_fake_repository(self.settings, self.sandbox_path)
        shutil.rmtree(self.settings.REPO_METADATADIR)
        clone(self.settings.REPO_METADATADIR, self.repositories_bare, \
            branch='master')
Beispiel #5
0
 def setUp(self):
     super(GitlabProducerTestCase, self).setUp()
     init_repositories(self.settings)
     (bare, user) = create_fake_repository(self.settings, self.sandbox_path, ['qa'])
     add_repository(self.settings, 'common', 'site', bare)
     self.site_bare = bare
     gitlabproducer.config['settings'] = self.settings
     self.app = gitlabproducer.test_client()
Beispiel #6
0
 def setUp(self):
     super(GitlabProducerTestCase, self).setUp()
     init_repositories()
     (bare, user) = create_fake_repository(self.sandbox_path, ['qa'])
     add_repository('common', 'site', bare)
     self.site_bare = bare
     gitlabproducer.config['settings'] = Settings()
     self.app = gitlabproducer.test_client()
Beispiel #7
0
    def setUp(self):
        super(MaintenanceTest, self).setUp()

        self.settings = Settings()

        # validate_directories() expects both below to look
        # like a Git repository.

        (self.environments_bare, self.environments) = \
            create_fake_repository(self.sandbox_path)
        shutil.rmtree(self.settings.ENV_METADATADIR)
        clone(self.settings.ENV_METADATADIR, self.environments_bare, \
            branch='master')

        (self.repositories_bare, self.repositories) = \
            create_fake_repository(self.sandbox_path)
        shutil.rmtree(self.settings.REPO_METADATADIR)
        clone(self.settings.REPO_METADATADIR, self.repositories_bare, \
            branch='master')
Beispiel #8
0
    def setUp(self):
        super(MaintenanceTest, self).setUp()

        self.settings = Settings()

        # validate_directories() expects both below to look
        # like a Git repository.

        (self.environments_bare, self.environments) = \
            create_fake_repository(self.sandbox_path)
        shutil.rmtree(self.settings.ENV_METADATADIR)
        clone(self.settings.ENV_METADATADIR, self.environments_bare, \
            branch='master')

        (self.repositories_bare, self.repositories) = \
            create_fake_repository(self.sandbox_path)
        shutil.rmtree(self.settings.REPO_METADATADIR)
        clone(self.settings.REPO_METADATADIR, self.repositories_bare, \
            branch='master')
Beispiel #9
0
 def _create_fake_hostgroup(self, hostgroup, branches=[]):
     (bare, user) = create_fake_repository(self.settings, self.sandbox_path, branches)
     add_repository(self.settings, 'hostgroups', hostgroup, bare)
     return user
Beispiel #10
0
 def _create_fake_module(self, modulename, branches=[]):
     (bare, user) = create_fake_repository(self.settings, self.sandbox_path, branches)
     add_repository(self.settings, 'modules', modulename, bare)
     return user
Beispiel #11
0
 def _create_fake_hostgroup(self, hostgroup, branches=[]):
     (bare, user) = create_fake_repository(self.settings, self.sandbox_path, branches)
     add_repository(self.settings, 'hostgroups', hostgroup, bare)
     return user
Beispiel #12
0
 def _create_fake_module(self, modulename, branches=[]):
     (bare, user) = create_fake_repository(self.settings, self.sandbox_path, branches)
     add_repository(self.settings, 'modules', modulename, bare)
     return user