@@ -10,7 +10,6 @@ import (
1010 "strings"
1111 "testing"
1212
13- "github.com/docker/docker/api/types"
1413 "github.com/docker/docker/api/types/filters"
1514 "github.com/docker/docker/api/types/registry"
1615 "github.com/docker/docker/errdefs"
@@ -22,15 +21,15 @@ func TestImageSearchAnyError(t *testing.T) {
2221 client := & Client {
2322 client : newMockClient (errorMock (http .StatusInternalServerError , "Server error" )),
2423 }
25- _ , err := client .ImageSearch (context .Background (), "some-image" , types. ImageSearchOptions {})
24+ _ , err := client .ImageSearch (context .Background (), "some-image" , registry. SearchOptions {})
2625 assert .Check (t , is .ErrorType (err , errdefs .IsSystem ))
2726}
2827
2928func TestImageSearchStatusUnauthorizedError (t * testing.T ) {
3029 client := & Client {
3130 client : newMockClient (errorMock (http .StatusUnauthorized , "Unauthorized error" )),
3231 }
33- _ , err := client .ImageSearch (context .Background (), "some-image" , types. ImageSearchOptions {})
32+ _ , err := client .ImageSearch (context .Background (), "some-image" , registry. SearchOptions {})
3433 assert .Check (t , is .ErrorType (err , errdefs .IsUnauthorized ))
3534}
3635
@@ -41,7 +40,7 @@ func TestImageSearchWithUnauthorizedErrorAndPrivilegeFuncError(t *testing.T) {
4140 privilegeFunc := func (_ context.Context ) (string , error ) {
4241 return "" , fmt .Errorf ("Error requesting privilege" )
4342 }
44- _ , err := client .ImageSearch (context .Background (), "some-image" , types. ImageSearchOptions {
43+ _ , err := client .ImageSearch (context .Background (), "some-image" , registry. SearchOptions {
4544 PrivilegeFunc : privilegeFunc ,
4645 })
4746 if err == nil || err .Error () != "Error requesting privilege" {
@@ -56,7 +55,7 @@ func TestImageSearchWithUnauthorizedErrorAndAnotherUnauthorizedError(t *testing.
5655 privilegeFunc := func (_ context.Context ) (string , error ) {
5756 return "a-auth-header" , nil
5857 }
59- _ , err := client .ImageSearch (context .Background (), "some-image" , types. ImageSearchOptions {
58+ _ , err := client .ImageSearch (context .Background (), "some-image" , registry. SearchOptions {
6059 PrivilegeFunc : privilegeFunc ,
6160 })
6261 assert .Check (t , is .ErrorType (err , errdefs .IsUnauthorized ))
@@ -101,7 +100,7 @@ func TestImageSearchWithPrivilegedFuncNoError(t *testing.T) {
101100 privilegeFunc := func (_ context.Context ) (string , error ) {
102101 return "IAmValid" , nil
103102 }
104- results , err := client .ImageSearch (context .Background (), "some-image" , types. ImageSearchOptions {
103+ results , err := client .ImageSearch (context .Background (), "some-image" , registry. SearchOptions {
105104 RegistryAuth : "NotValid" ,
106105 PrivilegeFunc : privilegeFunc ,
107106 })
@@ -145,7 +144,7 @@ func TestImageSearchWithoutErrors(t *testing.T) {
145144 }, nil
146145 }),
147146 }
148- results , err := client .ImageSearch (context .Background (), "some-image" , types. ImageSearchOptions {
147+ results , err := client .ImageSearch (context .Background (), "some-image" , registry. SearchOptions {
149148 Filters : filters .NewArgs (
150149 filters .Arg ("is-automated" , "true" ),
151150 filters .Arg ("stars" , "3" ),
0 commit comments