Skip to content

Commit e6bc3b6

Browse files
author
Oleg Bulatov
committed
Fix imports
1 parent 314849b commit e6bc3b6

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

pkg/dockerregistry/testutil/manifests.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"github.com/docker/distribution/reference"
1818
distclient "github.com/docker/distribution/registry/client"
1919
"github.com/docker/distribution/registry/client/auth"
20+
"github.com/docker/distribution/registry/client/auth/challenge"
2021
"github.com/docker/distribution/registry/client/transport"
2122
"github.com/docker/libtrust"
2223

@@ -225,7 +226,7 @@ func CreateAndUploadTestManifest(
225226

226227
var rt http.RoundTripper
227228
if creds != nil {
228-
challengeManager := auth.NewSimpleChallengeManager()
229+
challengeManager := challenge.NewSimpleManager()
229230
_, err := ping(challengeManager, serverURL.String()+"/v2/", "")
230231
if err != nil {
231232
return "", "", "", nil, err

pkg/dockerregistry/testutil/util.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"github.com/docker/distribution/reference"
1818
distclient "github.com/docker/distribution/registry/client"
1919
"github.com/docker/distribution/registry/client/auth"
20+
"github.com/docker/distribution/registry/client/auth/challenge"
2021
"github.com/docker/distribution/registry/client/transport"
2122

2223
imageapi "github.com/openshift/origin/pkg/image/apis/image"
@@ -40,7 +41,7 @@ func UploadBlob(
4041

4142
var rt http.RoundTripper
4243
if creds != nil {
43-
challengeManager := auth.NewSimpleChallengeManager()
44+
challengeManager := challenge.NewSimpleManager()
4445
_, err := ping(challengeManager, serverURL.String()+"/v2/", "")
4546
if err != nil {
4647
return distribution.Descriptor{}, err
@@ -233,7 +234,7 @@ func (tcs *testCredentialStore) SetRefreshToken(u *url.URL, service string, toke
233234

234235
// ping pings the provided endpoint to determine its required authorization challenges.
235236
// If a version header is provided, the versions will be returned.
236-
func ping(manager auth.ChallengeManager, endpoint, versionHeader string) ([]auth.APIVersion, error) {
237+
func ping(manager challenge.Manager, endpoint, versionHeader string) ([]auth.APIVersion, error) {
237238
resp, err := http.Get(endpoint)
238239
if err != nil {
239240
return nil, err

pkg/image/importer/client.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/docker/distribution/registry/api/errcode"
2222
registryclient "github.com/docker/distribution/registry/client"
2323
"github.com/docker/distribution/registry/client/auth"
24+
"github.com/docker/distribution/registry/client/auth/challenge"
2425
"github.com/docker/distribution/registry/client/transport"
2526

2627
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -45,14 +46,14 @@ func NewContext(transport, insecureTransport http.RoundTripper) Context {
4546
return Context{
4647
Transport: transport,
4748
InsecureTransport: insecureTransport,
48-
Challenges: auth.NewSimpleChallengeManager(),
49+
Challenges: challenge.NewSimpleManager(),
4950
}
5051
}
5152

5253
type Context struct {
5354
Transport http.RoundTripper
5455
InsecureTransport http.RoundTripper
55-
Challenges auth.ChallengeManager
56+
Challenges challenge.Manager
5657
}
5758

5859
func (c Context) WithCredentials(credentials auth.CredentialStore) RepositoryRetriever {

0 commit comments

Comments
 (0)