Exemple #1
0
 def test_git_get_repocache_hash_without_subdir(self):
     scm_object = git(self.cli, self.tasks)
     scm_object.url = 'https://github.com/openSUSE/obs-service-tar_scm.git'
     repohash = scm_object.get_repocache_hash(None)
     self.assertEqual(
         repohash,
         'c0f3245498ad916e9ee404acfd7aa59e29d53b7a063a8609735c1284c67b2161')
Exemple #2
0
 def test_git_get_repocache_hash_with_subdir(self):
     '''
     This test case proves that subdir is ignored in
     TarSCM.base.scm.get_repocache_hash
     '''
     scm_object = git(self.cli, self.tasks)
     scm_object.url = 'https://github.com/openSUSE/obs-service-tar_scm.git'
     repohash = scm_object.get_repocache_hash('subdir')
     self.assertEqual(
         repohash,
         'c0f3245498ad916e9ee404acfd7aa59e29d53b7a063a8609735c1284c67b2161')
 def test_obscpio_create_archive(self):
     tc_name              = inspect.stack()[0][3]
     cl_name              = self.__class__.__name__
     scm_object           = git(self.cli,self.tasks)
     scm_object.clone_dir = os.path.join(self.fixtures_dir,tc_name,'repo')
     ver                  = '0.1.1'
     scm_object.arch_dir  = os.path.join(self.fixtures_dir,tc_name,'repo')
     outdir               = os.path.join(self.tmp_dir,cl_name,tc_name,'out')
     self.cli.outdir      = outdir
     arch                 = obscpio()
     os.makedirs(outdir)
     arch.create_archive(
         scm_object,
         cli      = self.cli,
         basename = 'test',
         dstname  = 'test',
         version  = '0.1.1'
     )
Exemple #4
0
 def test_obscpio_create_archive(self):
     tc_name              = inspect.stack()[0][3]
     cl_name              = self.__class__.__name__
     scm_object           = git(self.cli, self.tasks)
     scm_object.clone_dir = os.path.join(self.fixtures_dir, tc_name, 'repo')
     ver                  = '0.1.1'
     scm_object.arch_dir  = os.path.join(self.fixtures_dir, tc_name, 'repo')
     outdir               = os.path.join(self.tmp_dir, cl_name, tc_name,
                                         'out')
     self.cli.outdir      = outdir
     arch                 = obscpio()
     os.makedirs(outdir)
     arch.create_archive(
         scm_object,
         cli      = self.cli,
         basename = 'test',
         dstname  = 'test',
         version  = '0.1.1'
     )
 def test_git_get_repocache_hash_with_subdir(self):
     '''This test case proves that subdir is ignored in TarSCM.base.scm.get_repocache_hash'''
     scm_object = git(self.cli,self.tasks)
     scm_object.url = 'https://github.com/openSUSE/obs-service-tar_scm.git'
     repohash = scm_object.get_repocache_hash('subdir')
     self.assertEqual(repohash,'c0f3245498ad916e9ee404acfd7aa59e29d53b7a063a8609735c1284c67b2161')
 def test_git_get_repocache_hash_without_subdir(self):
     scm_object = git(self.cli,self.tasks)
     scm_object.url = 'https://github.com/openSUSE/obs-service-tar_scm.git'
     repohash = scm_object.get_repocache_hash(None)
     self.assertEqual(repohash,'c0f3245498ad916e9ee404acfd7aa59e29d53b7a063a8609735c1284c67b2161')