(t *testing.T)
| 102 | } |
| 103 | |
| 104 | func 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 | |
| 124 | func TestParseMessageBlock(t *testing.T) { |
| 125 | sc, err := parseMessageBlock([]byte(testMessageBlock)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…