Commit 8a0045ba by Michael DeHaan

Update tests for ansible-galaxy CLI additions.

parent d87830e1
...@@ -381,11 +381,15 @@ def role_spec_parse(role_spec): ...@@ -381,11 +381,15 @@ def role_spec_parse(role_spec):
# } # }
role_spec = role_spec.strip() role_spec = role_spec.strip()
role_version = 'master' role_version = ''
if role_spec == "" or role_spec.startswith("#"): if role_spec == "" or role_spec.startswith("#"):
return (None, None, None, None) return (None, None, None, None)
tokens = [s.strip() for s in role_spec.split(',')] tokens = [s.strip() for s in role_spec.split(',')]
if not tokens[0].endswith('.tar.gz'):
# pick a reasonable default branch
role_version = 'master'
# assume https://github.com URLs are git+https:// URLs and not # assume https://github.com URLs are git+https:// URLs and not
# tarballs unless they end in '.zip' # tarballs unless they end in '.zip'
......
...@@ -829,7 +829,7 @@ class TestUtils(unittest.TestCase): ...@@ -829,7 +829,7 @@ class TestUtils(unittest.TestCase):
{ {
'scm' : 'git', 'scm' : 'git',
'src' : 'http://github.com/ansible/fakerole/fake', 'src' : 'http://github.com/ansible/fakerole/fake',
'version' : '', 'version' : 'master',
'name' : 'fake' 'name' : 'fake'
} }
), ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment