mirror of https://github.com/docker/cli.git
cli/command/manifest: rename vars that collided with import
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
3f0c189e48
commit
9d7e21be21
|
@ -61,10 +61,10 @@ func fullImageManifest(t *testing.T, ref reference.Named) types.ImageManifest {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestInspectCommandLocalManifestNotFound(t *testing.T) {
|
func TestInspectCommandLocalManifestNotFound(t *testing.T) {
|
||||||
store := store.NewStore(t.TempDir())
|
refStore := store.NewStore(t.TempDir())
|
||||||
|
|
||||||
cli := test.NewFakeCli(nil)
|
cli := test.NewFakeCli(nil)
|
||||||
cli.SetManifestStore(store)
|
cli.SetManifestStore(refStore)
|
||||||
|
|
||||||
cmd := newInspectCommand(cli)
|
cmd := newInspectCommand(cli)
|
||||||
cmd.SetOut(io.Discard)
|
cmd.SetOut(io.Discard)
|
||||||
|
@ -74,10 +74,10 @@ func TestInspectCommandLocalManifestNotFound(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestInspectCommandNotFound(t *testing.T) {
|
func TestInspectCommandNotFound(t *testing.T) {
|
||||||
store := store.NewStore(t.TempDir())
|
refStore := store.NewStore(t.TempDir())
|
||||||
|
|
||||||
cli := test.NewFakeCli(nil)
|
cli := test.NewFakeCli(nil)
|
||||||
cli.SetManifestStore(store)
|
cli.SetManifestStore(refStore)
|
||||||
cli.SetRegistryClient(&fakeRegistryClient{
|
cli.SetRegistryClient(&fakeRegistryClient{
|
||||||
getManifestFunc: func(_ context.Context, _ reference.Named) (types.ImageManifest, error) {
|
getManifestFunc: func(_ context.Context, _ reference.Named) (types.ImageManifest, error) {
|
||||||
return types.ImageManifest{}, errors.New("missing")
|
return types.ImageManifest{}, errors.New("missing")
|
||||||
|
@ -95,13 +95,13 @@ func TestInspectCommandNotFound(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestInspectCommandLocalManifest(t *testing.T) {
|
func TestInspectCommandLocalManifest(t *testing.T) {
|
||||||
store := store.NewStore(t.TempDir())
|
refStore := store.NewStore(t.TempDir())
|
||||||
|
|
||||||
cli := test.NewFakeCli(nil)
|
cli := test.NewFakeCli(nil)
|
||||||
cli.SetManifestStore(store)
|
cli.SetManifestStore(refStore)
|
||||||
namedRef := ref(t, "alpine:3.0")
|
namedRef := ref(t, "alpine:3.0")
|
||||||
imageManifest := fullImageManifest(t, namedRef)
|
imageManifest := fullImageManifest(t, namedRef)
|
||||||
err := store.Save(ref(t, "list:v1"), namedRef, imageManifest)
|
err := refStore.Save(ref(t, "list:v1"), namedRef, imageManifest)
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
|
|
||||||
cmd := newInspectCommand(cli)
|
cmd := newInspectCommand(cli)
|
||||||
|
@ -113,10 +113,10 @@ func TestInspectCommandLocalManifest(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestInspectcommandRemoteManifest(t *testing.T) {
|
func TestInspectcommandRemoteManifest(t *testing.T) {
|
||||||
store := store.NewStore(t.TempDir())
|
refStore := store.NewStore(t.TempDir())
|
||||||
|
|
||||||
cli := test.NewFakeCli(nil)
|
cli := test.NewFakeCli(nil)
|
||||||
cli.SetManifestStore(store)
|
cli.SetManifestStore(refStore)
|
||||||
cli.SetRegistryClient(&fakeRegistryClient{
|
cli.SetRegistryClient(&fakeRegistryClient{
|
||||||
getManifestFunc: func(_ context.Context, ref reference.Named) (types.ImageManifest, error) {
|
getManifestFunc: func(_ context.Context, ref reference.Named) (types.ImageManifest, error) {
|
||||||
return fullImageManifest(t, ref), nil
|
return fullImageManifest(t, ref), nil
|
||||||
|
|
Loading…
Reference in New Issue