Skip to content

Commit

Permalink
Fix ssh-buildx test and change assert to if-then-raise block
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejbrown committed Aug 19, 2024
1 parent ca289e8 commit bf08571
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion buildrunner/sshagent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@ def get_ssh_agent_image(self):
use_threading=False,
)
)
assert len(built_images_info.built_images) == 1
if len(built_images_info.built_images) != 1:
raise BuildRunnerProcessingError(
"Failed to build ssh-agent image. Retrying the build may resolve the issue."
)
self._ssh_agent_image = built_images_info.built_images[0].trunc_digest
return self._ssh_agent_image

Expand Down
2 changes: 1 addition & 1 deletion tests/test-files/test-ssh-buildx.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use-legacy-builder: True
use-legacy-builder: False
steps:
clone:
build:
Expand Down

0 comments on commit bf08571

Please sign in to comment.