Skip to content

Commit

Permalink
fix(cachi2): single remote source name
Browse files Browse the repository at this point in the history
When single remote source is used, returned name should be None and not
an empty string. This si compatible with Cachito behavior.

Signed-off-by: Martin Basti <[email protected]>
  • Loading branch information
MartinBasti committed Nov 28, 2024
1 parent 2b7138a commit 9aa49c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion atomic_reactor/plugins/cachi2_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def process_remote_sources(self) -> List[Dict[str, Any]]:
remote_sources = self.multiple_remote_sources_params
if self.single_remote_source_params:
remote_sources = [{
"name": "", # name single remote source with generic name
"name": None,
"remote_source": self.single_remote_source_params}]

processed_remote_sources = []
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/test_cachi2_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def test_single_remote_source_initialization(workflow, mocked_cachi2_init):
'/remote-source')

assert result == [{
"name": "",
"name": None,
"source_path": str(
workflow.build_dir.path / CACHI2_BUILD_DIR / CACHI2_SINGLE_REMOTE_SOURCE_NAME),
"remote_source": {
Expand Down

0 comments on commit 9aa49c4

Please sign in to comment.