MCPcopy Index your code
hub / github.com/cli/cli / TestZipLogFetcher

Function TestZipLogFetcher

pkg/cmd/run/view/logs_test.go:18–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16)
17
18func TestZipLogFetcher(t *testing.T) {
19 zr := createZipReader(t, map[string]string{
20 "foo.txt": "blah blah",
21 })
22
23 fetcher := &zipLogFetcher{
24 File: zr.File[0],
25 }
26
27 rc, err := fetcher.GetLog()
28 assert.NoError(t, err)
29
30 defer rc.Close()
31
32 content, err := io.ReadAll(rc)
33 assert.NoError(t, err)
34 assert.Equal(t, "blah blah", string(content))
35}
36
37func TestApiLogFetcher(t *testing.T) {
38 tests := []struct {

Callers

nothing calls this directly

Calls 4

GetLogMethod · 0.95
createZipReaderFunction · 0.85
EqualMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected