distribution_inspect_test.go 445 B

123456789101112131415161718
  1. package client
  2. import (
  3. "net/http"
  4. "testing"
  5. "github.com/stretchr/testify/assert"
  6. "golang.org/x/net/context"
  7. )
  8. func TestDistributionInspectUnsupported(t *testing.T) {
  9. client := &Client{
  10. version: "1.29",
  11. client: &http.Client{},
  12. }
  13. _, err := client.DistributionInspect(context.Background(), "foobar:1.0", "")
  14. assert.EqualError(t, err, `"distribution inspect" requires API version 1.30, but the Docker daemon API version is 1.29`)
  15. }