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

Function assertTestData

runtime/ui/viewmodel/filetree_test.go:63–74  ·  view source on GitHub ↗
(t *testing.T, actualBytes []byte)

Source from the content-addressed store, hash-verified

61}
62
63func assertTestData(t *testing.T, actualBytes []byte) {
64 path := testCaseDataFilePath(t.Name())
65 if !fileExists(path) {
66 if allowTestDataCapture {
67 helperCaptureBytes(t, actualBytes)
68 } else {
69 t.Fatalf("missing test data: %s", path)
70 }
71 }
72 expectedBytes := helperLoadBytes(t)
73 helperCheckDiff(t, expectedBytes, actualBytes)
74}
75
76func initializeTestViewModel(t *testing.T) *FileTreeViewModel {
77 result := docker.TestAnalysisFromArchive(t, "../../../.data/test-docker-image.tar")

Callers 1

runTestCaseFunction · 0.85

Calls 6

testCaseDataFilePathFunction · 0.85
fileExistsFunction · 0.85
helperCaptureBytesFunction · 0.85
helperLoadBytesFunction · 0.85
helperCheckDiffFunction · 0.85
NameMethod · 0.65

Tested by

no test coverage detected