mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-12 03:14:24 -07:00
Starting work on getting integration tests working on v2
This is incomplete work, and requires some minor tweeks to the integration tests which are not included in this commit.
This commit is contained in:
parent
d7f67ea62b
commit
2aeb79f45f
24 changed files with 189 additions and 155 deletions
|
@ -111,16 +111,10 @@ class ActionModule(ActionBase):
|
|||
# return ReturnData(conn=conn, result=results)
|
||||
###############################################################################################
|
||||
else:
|
||||
# FIXME: templating needs to be worked out still
|
||||
#source = template.template(self.runner.basedir, source, inject)
|
||||
# FIXME: original_file stuff needs to be reworked - most likely
|
||||
# simply checking to see if the task has a role and using
|
||||
# using the role path as the dwim target and basedir would work
|
||||
#if '_original_file' in inject:
|
||||
# source = utils.path_dwim_relative(inject['_original_file'], 'files', source, self.runner.basedir)
|
||||
#else:
|
||||
# source = utils.path_dwim(self.runner.basedir, source)
|
||||
source = self._loader.path_dwim(source)
|
||||
if self._task._role is not None:
|
||||
source = self._loader.path_dwim_relative(self._task._role._role_path, 'files', source)
|
||||
else:
|
||||
source = self._loader.path_dwim(source)
|
||||
|
||||
# A list of source file tuples (full_path, relative_path) which will try to copy to the destination
|
||||
source_files = []
|
||||
|
@ -129,7 +123,7 @@ class ActionModule(ActionBase):
|
|||
if os.path.isdir(source):
|
||||
# Get the amount of spaces to remove to get the relative path.
|
||||
if source_trailing_slash:
|
||||
sz = len(source) + 1
|
||||
sz = len(source)
|
||||
else:
|
||||
sz = len(source.rsplit('/', 1)[0]) + 1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue