Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion aws_lambda_builders/workflows/java/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def _move_dependencies(self):
Move the entire lib directory from artifact folder to dependencies folder
"""
try:
dependencies_lib_dir = os.path.join(self.dependencies_dir, "lib")
lib_folder = os.path.join(self.artifacts_dir, "lib")
self.os_utils.move(lib_folder, self.dependencies_dir)
self.os_utils.move(lib_folder, dependencies_lib_dir)
except Exception as ex:
raise ActionFailedError(str(ex))
4 changes: 3 additions & 1 deletion tests/unit/workflows/java/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ def test_copies_artifacts(self):
action = JavaMoveDependenciesAction(self.artifacts_dir, self.dependencies_dir, self.os_utils)
action.execute()

self.os_utils.move.assert_called_with(os.path.join(self.artifacts_dir, "lib"), self.dependencies_dir)
self.os_utils.move.assert_called_with(
os.path.join(self.artifacts_dir, "lib"), os.path.join(self.dependencies_dir, "lib")
)

def test_error_in_artifact_copy_raises_action_error(self):
self.os_utils.move.side_effect = Exception("scandir failed!")
Expand Down