Skip to content
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

Additional description for module helm.Options - .logger.Discard #1083

Merged
merged 1 commit into from Mar 11, 2022

Conversation

sqerison
Copy link
Contributor

@sqerison sqerison commented Mar 11, 2022

Hello team.
This description will be helpful for engineers who are working with Helm.
I've spent a few hours looking for the solution to avoid logging while running tests inside the CI.

Example of use:

Import the logging module:

import (
    "github.com/gruntwork-io/terratest/modules/logger"
)

Then inside your function append the options with log parameters:

    options := &helm.Options{
        SetValues: map[string]string{
            "global.nameOverride": "test",
        },
        Logger: logger.Discard, // <- this line will disable console logging for the helm templates and will print only errors and PASS results.
    }

Copy link
Contributor

@infraredgirl infraredgirl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Test failure is unrelated so I'll go ahead and merge this.

Thanks for the contribution!

@infraredgirl infraredgirl merged commit da95ad1 into gruntwork-io:master Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants