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

adds custom logger to kubectl options #1325

Merged
merged 1 commit into from
Jul 25, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/k8s/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func RunKubectlAndGetOutputE(t testing.TestingT, options *KubectlOptions, args .
Command: "kubectl",
Args: cmdArgs,
Env: options.Env,
Logger: options.Logger,
}
return shell.RunCommandAndGetOutputE(t, command)
}
Expand Down
2 changes: 2 additions & 0 deletions modules/k8s/kubectl_options.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package k8s

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

Expand All @@ -11,6 +12,7 @@ type KubectlOptions struct {
Namespace string
Env map[string]string
InClusterAuth bool
Logger *logger.Logger
}

// NewKubectlOptions will return a pointer to new instance of KubectlOptions with the configured options
Expand Down