Skip to content

Commit e14cc99

Browse files
authored
Merge pull request #3438 from darfux/test_check_manifest_platform_nil
test: Check manifest.Platform before dereferencing
2 parents f58fda9 + 5e5ae23 commit e14cc99

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

client_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ func TestImagePullSomePlatforms(t *testing.T) {
293293

294294
found := false
295295
for _, matcher := range m {
296+
if manifest.Platform == nil {
297+
t.Fatal("manifest should have proper platform")
298+
}
296299
if matcher.Match(*manifest.Platform) {
297300
count++
298301
found = true

0 commit comments

Comments
 (0)