MCPcopy
hub / github.com/databus23/helm-diff / assertDiff

Function assertDiff

diff/diff_test.go:160–169  ·  view source on GitHub ↗
(t *testing.T, before, after string, context int, stripTrailingCR bool, expected string)

Source from the content-addressed store, hash-verified

158}
159
160func assertDiff(t *testing.T, before, after string, context int, stripTrailingCR bool, expected string) {
161 ansi.DisableColors(true)
162 var output bytes.Buffer
163 diffs := diffStrings(before, after, stripTrailingCR)
164 printDiffRecords([]string{}, "some-resource", context, diffs, &output)
165 actual := output.String()
166 if actual != expected {
167 t.Errorf("Unexpected diff output: \nExpected:\n#%v# \nActual:\n#%v#", expected, actual)
168 }
169}
170
171func TestManifests(t *testing.T) {
172 ansi.DisableColors(true)

Callers 1

TestPrintDiffWithContextFunction · 0.85

Calls 3

diffStringsFunction · 0.85
printDiffRecordsFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected