Skip to content

Commit e1bb6af

Browse files
committed
[wanda] fix a bug of local image resolving
otherwise it is breaking backwards compatibility
1 parent 572843b commit e1bb6af

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

wanda/resolve_image.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ func resolveLocalImage(name, ref string) (*imageSource, error) {
2424
}
2525

2626
return &imageSource{
27-
name: name,
28-
id: id.String(),
27+
name: name,
28+
id: id.String(),
29+
local: ref,
2930
}, nil
3031
}
3132

wanda/resolve_image_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ func TestResolveLocalImage(t *testing.T) {
4848
if want := imageID.String(); want != src.id {
4949
t.Errorf("got image id %q, want %q", src.id, want)
5050
}
51+
if src.local != tagStr {
52+
t.Errorf("got image local %q, want %q", src.local, tagStr)
53+
}
5154

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

0 commit comments

Comments
 (0)