mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 14:21:26 -07:00
Tidied up a little, added tests
Moved repo_url_to_role_name to common method in ansible.utils Added unit test for repo_url_to_role_name Added integration tests for galaxy
This commit is contained in:
parent
b550cb9bc3
commit
c2fe33f9f4
7 changed files with 38 additions and 7 deletions
|
@ -778,3 +778,8 @@ class TestUtils(unittest.TestCase):
|
|||
assert 'msg' not in data
|
||||
assert data['censored'] == 'results hidden due to no_log parameter'
|
||||
|
||||
def test_repo_url_to_role_name(self):
|
||||
tests = [("http://git.example.com/repos/repo.git", "repo"),
|
||||
("ssh://git@git.example.com:repos/role-name", "role-name")]
|
||||
for (url, result) in tests:
|
||||
self.assertEqual(ansible.utils.repo_url_to_role_name(url), result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue