Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libimage/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ func TestLookupImage(t *testing.T) {
runtime := testNewRuntime(t)
ctx := context.Background()

_, _, err := runtime.LookupImage("docker://busybox", nil)
require.EqualError(t, err, `unsupported transport "docker" for looking up local images; remove the transport prefix to refer to an image in local storage`)

pullOptions := &PullOptions{}
pullOptions.Writer = os.Stdout

Expand Down
2 changes: 1 addition & 1 deletion libimage/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func (r *Runtime) LookupImage(name string, options *LookupImageOptions) (*Image,
storageRef, err := alltransports.ParseImageName(name)
if err == nil {
if storageRef.Transport().Name() != storageTransport.Transport.Name() {
return nil, "", fmt.Errorf("unsupported transport %q for looking up local images", storageRef.Transport().Name())
return nil, "", fmt.Errorf("unsupported transport %q for looking up local images; remove the transport prefix to refer to an image in local storage", storageRef.Transport().Name())
}
_, img, err := storageTransport.ResolveReference(storageRef)
if err != nil {
Expand Down
Loading