(t *testing.T)
| 257 | } |
| 258 | |
| 259 | func TestUpgradeInstallWithSubchartNotes(t *testing.T) { |
| 260 | |
| 261 | releaseName := "wacky-bunny-v1" |
| 262 | relMock, ch, _ := prepareMockRelease(t, releaseName) |
| 263 | |
| 264 | defer resetEnv()() |
| 265 | |
| 266 | store := storageFixture() |
| 267 | |
| 268 | store.Create(relMock(releaseName, 1, ch)) |
| 269 | |
| 270 | cmd := fmt.Sprintf("upgrade %s -i --render-subchart-notes '%s'", releaseName, "testdata/testcharts/chart-with-subchart-notes") |
| 271 | _, _, err := executeActionCommandC(store, cmd) |
| 272 | if err != nil { |
| 273 | t.Errorf("unexpected error, got '%v'", err) |
| 274 | } |
| 275 | |
| 276 | upgradedReli, err := store.Get(releaseName, 2) |
| 277 | if err != nil { |
| 278 | t.Errorf("unexpected error, got '%v'", err) |
| 279 | } |
| 280 | upgradedRel, err := releaserToV1Release(upgradedReli) |
| 281 | if err != nil { |
| 282 | t.Errorf("unexpected error, got '%v'", err) |
| 283 | } |
| 284 | |
| 285 | if !strings.Contains(upgradedRel.Info.Notes, "PARENT NOTES") { |
| 286 | t.Errorf("The parent notes are not set correctly. NOTES: %s", upgradedRel.Info.Notes) |
| 287 | } |
| 288 | |
| 289 | if !strings.Contains(upgradedRel.Info.Notes, "SUBCHART NOTES") { |
| 290 | t.Errorf("The subchart notes are not set correctly. NOTES: %s", upgradedRel.Info.Notes) |
| 291 | } |
| 292 | |
| 293 | } |
| 294 | |
| 295 | func TestUpgradeWithValuesFile(t *testing.T) { |
| 296 |
nothing calls this directly
no test coverage detected
searching dependent graphs…