blob: 65ce9f4670f945d6d5b4c680045474fdda9bb599 [file] [edit]
package client
import (
"errors"
"net/http"
"testing"
cerrdefs "github.com/containerd/errdefs"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)
func TestDistributionInspectWithEmptyID(t *testing.T) {
client, err := New(WithMockClient(func(req *http.Request) (*http.Response, error) {
return nil, errors.New("should not make request")
}))
assert.NilError(t, err)
_, err = client.DistributionInspect(t.Context(), "", DistributionInspectOptions{})
assert.Check(t, is.ErrorType(err, cerrdefs.IsNotFound))
}