| |
@@ -68,6 +68,15 @@
|
| |
run.assert_called_once_with(['git', 'ls-remote', 'https://git.example.com/repo.git', 'HEAD'])
|
| |
self.assertEqual(url, 'https://git.example.com/repo.git?#CAFEBABE')
|
| |
|
| |
+ @mock.patch('pungi.util.run')
|
| |
+ def test_resolve_strip_git_plus_prefix(self, run):
|
| |
+ run.return_value = (0, 'CAFEBABE\tHEAD\n')
|
| |
+
|
| |
+ url = util.resolve_git_url('git+https://git.example.com/repo.git#HEAD')
|
| |
+
|
| |
+ run.assert_called_once_with(['git', 'ls-remote', 'https://git.example.com/repo.git', 'HEAD'])
|
| |
+ self.assertEqual(url, 'git+https://git.example.com/repo.git#CAFEBABE')
|
| |
+
|
| |
|
| |
class TestGetVariantData(unittest.TestCase):
|
| |
def test_get_simple(self):
|
| |
If the kickstart url starts with
git+
, strip that prefix. The final result will use it, this is just so thatgit ls-remote
works correctly.