MCPcopy
hub / github.com/wagoodman/dive / TestAnalysisFromArchive

Function TestAnalysisFromArchive

dive/image/docker/testing.go:20–36  ·  view source on GitHub ↗
(t *testing.T, path string)

Source from the content-addressed store, hash-verified

18}
19
20func TestAnalysisFromArchive(t *testing.T, path string) *image.AnalysisResult {
21 archive, err := TestLoadArchive(path)
22 if err != nil {
23 t.Fatalf("unable to fetch archive: %v", err)
24 }
25
26 img, err := archive.ToImage()
27 if err != nil {
28 t.Fatalf("unable to convert to image: %v", err)
29 }
30
31 result, err := img.Analyze()
32 if err != nil {
33 t.Fatalf("unable to analyze: %v", err)
34 }
35 return result
36}

Callers 4

Test_EvaluatorFunction · 0.92
initializeTestViewModelFunction · 0.92
Test_ExportFunction · 0.92
Test_AnalysisFunction · 0.85

Calls 3

TestLoadArchiveFunction · 0.85
ToImageMethod · 0.80
AnalyzeMethod · 0.65

Tested by

no test coverage detected