delete unnecessary checks and fix a test
Signed-off-by: Yu Yi <yiyu@google.com>
This commit is contained in:
parent
9e183f5e52
commit
aae2d0d754
@ -287,9 +287,6 @@ func TestImagePullSomePlatforms(t *testing.T) {
|
|||||||
count := 0
|
count := 0
|
||||||
for _, manifest := range manifests {
|
for _, manifest := range manifests {
|
||||||
children, err := images.Children(ctx, cs, manifest)
|
children, err := images.Children(ctx, cs, manifest)
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
found := false
|
found := false
|
||||||
for _, matcher := range m {
|
for _, matcher := range m {
|
||||||
@ -315,6 +312,8 @@ func TestImagePullSomePlatforms(t *testing.T) {
|
|||||||
}
|
}
|
||||||
ra.Close()
|
ra.Close()
|
||||||
}
|
}
|
||||||
|
} else if err == nil {
|
||||||
|
t.Fatal("manifest should not have pulled children content")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,9 +123,9 @@ func NewFetchConfig(ctx context.Context, clicontext *cli.Context) (*FetchConfig,
|
|||||||
}
|
}
|
||||||
config.Platforms = p
|
config.Platforms = p
|
||||||
}
|
}
|
||||||
if clicontext.Bool("all-manifests") {
|
|
||||||
config.IsAllManifests = clicontext.Bool("all-manifests")
|
config.IsAllManifests = clicontext.Bool("all-manifests")
|
||||||
}
|
|
||||||
return config, nil
|
return config, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,9 +82,6 @@ command. As part of this process, we do the following:
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if context.Bool("all-manifests") {
|
|
||||||
config.IsAllManifests = context.Bool("all-manifests")
|
|
||||||
}
|
|
||||||
|
|
||||||
img, err := content.Fetch(ctx, client, ref, config)
|
img, err := content.Fetch(ctx, client, ref, config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user