MCPcopy Index your code
hub / github.com/helm/helm / AssertGoldenString

Function AssertGoldenString

internal/test/test.go:43–49  ·  view source on GitHub ↗

AssertGoldenString asserts that the given string matches the contents of the given file.

(t TestingT, actual, filename string)

Source from the content-addressed store, hash-verified

41
42// AssertGoldenString asserts that the given string matches the contents of the given file.
43func AssertGoldenString(t TestingT, actual, filename string) {
44 t.Helper()
45
46 if err := compare([]byte(actual), path(filename)); err != nil {
47 t.Fatalf("%v\n", err)
48 }
49}
50
51// AssertGoldenFile asserts that the content of the actual file matches the contents of the expected file
52func AssertGoldenFile(t TestingT, actualFileName string, expectedFilename string) {

Callers 3

TestListFunction · 0.92
runTestCmdFunction · 0.92
AssertGoldenFileFunction · 0.85

Calls 4

compareFunction · 0.85
pathFunction · 0.85
HelperMethod · 0.80
FatalfMethod · 0.80

Tested by 2

TestListFunction · 0.74
runTestCmdFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…