MCPcopy
hub / github.com/helm/helm / TestMessageBlock

Function TestMessageBlock

pkg/provenance/sign_test.go:104–122  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

102}
103
104func TestMessageBlock(t *testing.T) {
105 metadataBytes := loadChartMetadataForSigning(t, testChartfile)
106
107 // Read the chart file data
108 archiveData, err := os.ReadFile(testChartfile)
109 if err != nil {
110 t.Fatal(err)
111 }
112
113 out, err := messageBlock(archiveData, filepath.Base(testChartfile), metadataBytes)
114 if err != nil {
115 t.Fatal(err)
116 }
117 got := out.String()
118
119 if got != testMessageBlock {
120 t.Errorf("Expected:\n%q\nGot\n%q\n", testMessageBlock, got)
121 }
122}
123
124func TestParseMessageBlock(t *testing.T) {
125 sc, err := parseMessageBlock([]byte(testMessageBlock))

Callers

nothing calls this directly

Calls 4

messageBlockFunction · 0.85
FatalMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…