Skip to content

Commit

Permalink
Merge pull request #1325 from retpolanne/master
Browse files Browse the repository at this point in the history
adds custom logger to kubectl options
  • Loading branch information
denis256 committed Jul 25, 2023
2 parents adad5f9 + f52242e commit 7f3b965
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
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

0 comments on commit 7f3b965

Please sign in to comment.