(t *testing.T, file string)
| 28 | } |
| 29 | |
| 30 | func readAlpineTag(t *testing.T, file string) string { |
| 31 | f, err := os.ReadFile(file) |
| 32 | if err != nil { |
| 33 | t.Fatal(err) |
| 34 | } |
| 35 | for line := range bytes.SplitSeq(f, []byte{'\n'}) { |
| 36 | line = bytes.TrimSpace(line) |
| 37 | _, suf, ok := bytes.Cut(line, []byte("FROM alpine:")) |
| 38 | if !ok { |
| 39 | continue |
| 40 | } |
| 41 | return string(suf) |
| 42 | } |
| 43 | return "" |
| 44 | } |
| 45 | |
| 46 | func TestShortAllocs(t *testing.T) { |
| 47 | allocs := int(testing.AllocsPerRun(10000, func() { |
no test coverage detected
searching dependent graphs…