예제 #1
0
 def test_repo_create_by_tag_proper_object(self):
     repo = Repository.by_tag('a-default', 'name', config=self.config)
     tools.assert_is_instance(repo, Repository)
     repo = Repository.by_tag('git', 'git@repo/dir.git', self.config, 'branch')
     tools.assert_is_instance(repo, Git)
     tools.assert_equals('dir', repo.directory)
     repo = Repository.by_tag('git', 'git@repo/dir.git', self.config, 'branch', 'directory')
     tools.assert_is_instance(repo, Git)
     tools.assert_equals('directory', repo.directory)
예제 #2
0
 def test_repo_loop_iterates_over_repositories_from_config(self):
     conf = Configuration(configuration={
         'repodir': '/var/repos',
         'repositories': [
             ('git', '[email protected]:kvbik/rehab.git', 'master'),
         ],
     })
     repo = list(Repository.loop(conf, {}))[0]
     tools.assert_is_instance(repo, Git)
     tools.assert_equals('[email protected]:kvbik/rehab.git', repo.name)
     tools.assert_equals('master', repo.branch)
예제 #3
0
 def test_repo_object_and_its_properties(self):
     repo = Repository('name', config=self.config)
     tools.assert_equals('name', repo.name)
     tools.assert_equals('1', repo.current_version)
     tools.assert_true(repo.has_changed('any-file-name.txt'))