示例#1
0
 def test_different_repo(self):
     variants = [
         'http://github.com/user/spinnaker',
         'http://github.com/path/user/spinnaker',
         'http://github.com/user/spinnaker/path',
         'http://github.com/user/spinnaker.github',
         'http://github/user/spinnaker',
         'http://mydomain.com/user/spinnaker', 'path/user/spinnaker'
     ]
     for url in variants[1:]:
         self.assertFalse(GitRunner.is_same_repo(variants[0], url))
示例#2
0
 def test_is_same_repo(self):
     variants = [
         'http://github.com/user/spinnaker',
         'http://github.com/user/spinnaker.git',
         'https://github.com/user/spinnaker',
         'https://github.com/user/spinnaker.git',
         '[email protected]:user/spinnaker.git',
         '[email protected]:user/spinnaker.git'
     ]
     for url in variants:
         self.assertTrue(GitRunner.is_same_repo(variants[0], url))