blob: 640aaffc55301f5a08ee36929fdb90a092460e2f [file] [log] [blame]
package client
import (
"context"
"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(context.Background(), "", DistributionInspectOptions{})
assert.Check(t, is.ErrorType(err, cerrdefs.IsNotFound))
}