Skip to content

Commit

Permalink
[wanda] fix a bug of local image resolving
Browse files Browse the repository at this point in the history
otherwise it is breaking backwards compatibility
  • Loading branch information
aslonnie committed Aug 17, 2023
1 parent 572843b commit e1bb6af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wanda/resolve_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ func resolveLocalImage(name, ref string) (*imageSource, error) {
}

return &imageSource{
name: name,
id: id.String(),
name: name,
id: id.String(),
local: ref,
}, nil
}

Expand Down
3 changes: 3 additions & 0 deletions wanda/resolve_image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ func TestResolveLocalImage(t *testing.T) {
if want := imageID.String(); want != src.id {
t.Errorf("got image id %q, want %q", src.id, want)
}
if src.local != tagStr {
t.Errorf("got image local %q, want %q", src.local, tagStr)
}

dockerCmd := newDockerCmd("")
if err := dockerCmd.run("image", "rm", tagStr); err != nil {
Expand Down

0 comments on commit e1bb6af

Please sign in to comment.