Skip to content

Fixing tests that were broken with #119 #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions cmd/revision.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type revision struct {
suppressedKinds []string
revisions []string
outputContext int
includeTests bool
}

const revisionCmdLongUsage = `
Expand Down Expand Up @@ -79,6 +80,7 @@ func revisionCmd() *cobra.Command {
revisionCmd.Flags().BoolP("suppress-secrets", "q", false, "suppress secrets in the output")
revisionCmd.Flags().StringArrayVar(&diff.suppressedKinds, "suppress", []string{}, "allows suppression of the values listed in the diff output")
revisionCmd.Flags().IntVarP(&diff.outputContext, "context", "C", -1, "output NUM lines of context around changes")
revisionCmd.Flags().BoolVar(&diff.includeTests, "include-tests", false, "enable the diffing of the helm test hooks")
revisionCmd.SuggestionsMinimumDistance = 1

addCommonCmdOptions(revisionCmd.Flags())
Expand All @@ -103,8 +105,8 @@ func (d *revision) differentiate() error {
}

diff.DiffManifests(
manifest.ParseRelease(revisionResponse.Release),
manifest.ParseRelease(releaseResponse.Release),
manifest.ParseRelease(revisionResponse.Release, d.includeTests),
manifest.ParseRelease(releaseResponse.Release, d.includeTests),
d.suppressedKinds,
d.outputContext,
os.Stdout)
Expand All @@ -127,8 +129,8 @@ func (d *revision) differentiate() error {
}

seenAnyChanges := diff.DiffManifests(
manifest.ParseRelease(revisionResponse1.Release),
manifest.ParseRelease(revisionResponse2.Release),
manifest.ParseRelease(revisionResponse1.Release, d.includeTests),
manifest.ParseRelease(revisionResponse2.Release, d.includeTests),
d.suppressedKinds,
d.outputContext,
os.Stdout)
Expand Down
6 changes: 4 additions & 2 deletions cmd/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type rollback struct {
suppressedKinds []string
revisions []string
outputContext int
includeTests bool
}

const rollbackCmdLongUsage = `
Expand Down Expand Up @@ -70,6 +71,7 @@ func rollbackCmd() *cobra.Command {
rollbackCmd.Flags().BoolP("suppress-secrets", "q", false, "suppress secrets in the output")
rollbackCmd.Flags().StringArrayVar(&diff.suppressedKinds, "suppress", []string{}, "allows suppression of the values listed in the diff output")
rollbackCmd.Flags().IntVarP(&diff.outputContext, "context", "C", -1, "output NUM lines of context around changes")
rollbackCmd.Flags().BoolVar(&diff.includeTests, "include-tests", false, "enable the diffing of the helm test hooks")
rollbackCmd.SuggestionsMinimumDistance = 1

addCommonCmdOptions(rollbackCmd.Flags())
Expand All @@ -95,8 +97,8 @@ func (d *rollback) backcast() error {

// create a diff between the current manifest and the version of the manifest that a user is intended to rollback
seenAnyChanges := diff.DiffManifests(
manifest.ParseRelease(releaseResponse.Release),
manifest.ParseRelease(revisionResponse.Release),
manifest.ParseRelease(releaseResponse.Release, d.includeTests),
manifest.ParseRelease(revisionResponse.Release, d.includeTests),
d.suppressedKinds,
d.outputContext,
os.Stdout)
Expand Down