Skip to content

Commit

Permalink
save platforms results in tekton results as dict
Browse files Browse the repository at this point in the history
* STONEBLD-1228

Signed-off-by: Robert Cerven <rcerven@redhat.com>
  • Loading branch information
rcerven committed May 9, 2023
1 parent 6fc8370 commit 4e1643f
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/check_and_set_platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ def has_enabled_hosts(platform: str) -> bool:

if self.workflow.platforms_result:
with open(self.workflow.platforms_result, 'w') as f:
f.write(json.dumps(final_defined))
f.write(json.dumps({'platforms': final_defined}))

return final_defined
2 changes: 1 addition & 1 deletion tests/plugins/test_check_and_set_platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def test_check_and_set_platforms(workflow, source_dir, caplog, tmpdir,

with open(workflow.platforms_result) as f:
platforms_result = json.loads(f.read())
assert plugin_result[PLUGIN_CHECK_AND_SET_PLATFORMS_KEY] == platforms_result
assert {'platforms': plugin_result[PLUGIN_CHECK_AND_SET_PLATFORMS_KEY]} == platforms_result

else:
with pytest.raises(Exception):
Expand Down

0 comments on commit 4e1643f

Please sign in to comment.