Skip to content

Commit

Permalink
Batch: fix job parameters definition (#8043)
Browse files Browse the repository at this point in the history
  • Loading branch information
pinzon committed Aug 27, 2024
1 parent 0a70aca commit 035dfac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion moto/batch/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ def _add_parameters_to_command(self, command: Union[str, List[str]]) -> List[str
return command

new_command = [
command_part.replace(f"${param}", value)
command_part.replace(f"Ref::{param}", value)
for command_part in command
for param, value in self.parameters.items()
]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_batch/test_batch_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ def test_submit_job_with_parameters():
"image": "busybox",
"vcpus": 1,
"memory": 512,
"command": ["sleep", "$seconds"],
"command": ["sleep", "Ref::seconds"],
},
parameters={"seconds": "0"},
)
Expand Down

0 comments on commit 035dfac

Please sign in to comment.