delete unnecessary checks and fix a test

Signed-off-by: Yu Yi <yiyu@google.com>
This commit is contained in:
Yu Yi 2019-03-25 16:01:23 -04:00 committed by Derek McGowan
parent 9e183f5e52
commit aae2d0d754
No known key found for this signature in database
GPG Key ID: F58C5D0A4405ACDB
3 changed files with 5 additions and 9 deletions

View File

@ -287,9 +287,6 @@ func TestImagePullSomePlatforms(t *testing.T) {
count := 0
for _, manifest := range manifests {
children, err := images.Children(ctx, cs, manifest)
if err != nil {
t.Fatal(err)
}
found := false
for _, matcher := range m {
@ -315,6 +312,8 @@ func TestImagePullSomePlatforms(t *testing.T) {
}
ra.Close()
}
} else if err == nil {
t.Fatal("manifest should not have pulled children content")
}
}

View File

@ -123,9 +123,9 @@ func NewFetchConfig(ctx context.Context, clicontext *cli.Context) (*FetchConfig,
}
config.Platforms = p
}
if clicontext.Bool("all-manifests") {
config.IsAllManifests = clicontext.Bool("all-manifests")
}
return config, nil
}

View File

@ -82,9 +82,6 @@ command. As part of this process, we do the following:
if err != nil {
return err
}
if context.Bool("all-manifests") {
config.IsAllManifests = context.Bool("all-manifests")
}
img, err := content.Fetch(ctx, client, ref, config)
if err != nil {