예제 #1
0
 def testCommit(self):
     s = GitScm({
         'scm': "git",
         'url': self.repodir,
         'commit': '0123456789012345678901234567890123456789',
         'recipe': "foo.yaml#0"
     })
     self.assertEqual(s.status(self.repodir_local, '', 0), 'unclean')
예제 #2
0
    def testUnpushed(self):
        f = open(os.path.join(self.repodir_local, "test.txt"), "w")
        f.write("test modified")
        f.close()
        self.callGit('git commit -a -m "modified"', cwd=self.repodir_local)

        s = GitScm({ 'scm' : "git", 'url' : self.repodir, 'recipe' : "foo.yaml#0" })
        self.assertEqual(s.status(self.repodir_local, '', 0), 'unclean')
예제 #3
0
 def testBranch(self):
     s = GitScm({
         'scm': "git",
         'url': self.repodir,
         'branch': 'anybranch',
         'recipe': "foo.yaml#0"
     })
     self.assertEqual(s.status(self.repodir_local, '', 0), 'unclean')
예제 #4
0
 def testTag(self):
     s = GitScm({
         'scm': "git",
         'url': self.repodir,
         'tag': 'v0.1',
         'recipe': "foo.yaml#0"
     })
     self.assertEqual(s.status(self.repodir_local, '', 0), 'unclean')
예제 #5
0
 def testUrl(self):
     s = GitScm({ 'scm' : "git", 'url' : 'anywhere', 'recipe' : "foo.yaml#0" })
     self.assertEqual(s.status(self.repodir_local, '', 0), 'unclean')
예제 #6
0
 def testModified(self):
     f = open(os.path.join(self.repodir_local, "test.txt"), "w")
     f.write("test modified")
     f.close()
     s = GitScm({ 'scm' : "git", 'url' : self.repodir, 'recipe' : "foo.yaml#0" })
     self.assertEqual(s.status(self.repodir_local, '')[0], 'dirty')
예제 #7
0
 def testEmpty(self):
     removePath(self.repodir_local)
     s = GitScm({ 'scm' : "git", 'url' : self.repodir, 'recipe' : "foo.yaml#0" })
     self.assertEqual(s.status(self.repodir_local, '')[0], 'empty')
예제 #8
0
 def testClean(self):
     s = GitScm({ 'scm' : "git", 'url' : self.repodir, 'recipe' : "foo.yaml#0" })
     self.assertEqual(s.status(self.repodir_local, '')[0], 'clean')