mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 23:31:25 -07:00
fixed issue with paths separator and others
finished normalizing of path handling removed overloaded '-p' from init_paths option, it is for role_paths removed expand_tilde and get_opt methods as both were redundant, adjusted rest of code updated tests to match
This commit is contained in:
parent
c426481b33
commit
fedbf3666b
3 changed files with 21 additions and 36 deletions
|
@ -134,7 +134,7 @@ class TestGalaxy(unittest.TestCase):
|
|||
role_file = os.path.join(self.role_path, self.role_name)
|
||||
|
||||
# removing role
|
||||
gc = GalaxyCLI(args=["remove", "-p", role_file, self.role_name])
|
||||
gc = GalaxyCLI(args=["remove", "--init-path", role_file, self.role_name])
|
||||
gc.parse()
|
||||
gc.run()
|
||||
|
||||
|
@ -292,7 +292,7 @@ class ValidRoleTests(object):
|
|||
cls.role_name = role_name
|
||||
|
||||
# create role using default skeleton
|
||||
gc = GalaxyCLI(args=['init', '-c', '--offline'] + galaxy_args + ['-p', cls.test_dir, cls.role_name])
|
||||
gc = GalaxyCLI(args=['init', '-c', '--offline'] + galaxy_args + ['--init-path', cls.test_dir, cls.role_name])
|
||||
gc.parse()
|
||||
gc.run()
|
||||
cls.gc = gc
|
||||
|
@ -430,4 +430,4 @@ class TestGalaxyInitSkeleton(unittest.TestCase, ValidRoleTests):
|
|||
self.assertTrue(os.path.exists(os.path.join(self.role_dir, 'templates_extra', 'templates.txt')))
|
||||
|
||||
def test_skeleton_option(self):
|
||||
self.assertEquals(self.role_skeleton_path, self.gc.get_opt('role_skeleton'), msg='Skeleton path was not parsed properly from the command line')
|
||||
self.assertEquals(self.role_skeleton_path, self.gc.options.role_skeleton, msg='Skeleton path was not parsed properly from the command line')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue