File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -469,9 +469,9 @@ func restclientConfig(kubeContext string) (*clientcmdapi.Config, error) {
469
469
type ClientConfigGetter func () (* restclient.Config , error )
470
470
471
471
// LoadConfig returns a config for a rest client with the UserAgent set to include the current test name.
472
- func LoadConfig () (config * restclient.Config , err error ) {
472
+ func LoadConfig (noUserAgent ... bool ) (config * restclient.Config , err error ) {
473
473
defer func () {
474
- if err == nil && config != nil {
474
+ if err == nil && config != nil && len ( noUserAgent ) == 0 {
475
475
testDesc := ginkgo .CurrentSpecReport ()
476
476
if len (testDesc .ContainerHierarchyTexts ) > 0 {
477
477
testName := strings .Join (testDesc .ContainerHierarchyTexts , " " )
@@ -513,8 +513,8 @@ func LoadConfig() (config *restclient.Config, err error) {
513
513
}
514
514
515
515
// LoadClientset returns clientset for connecting to kubernetes clusters.
516
- func LoadClientset () (* clientset.Clientset , error ) {
517
- config , err := LoadConfig ()
516
+ func LoadClientset (noUserAgent ... bool ) (* clientset.Clientset , error ) {
517
+ config , err := LoadConfig (noUserAgent ... )
518
518
if err != nil {
519
519
return nil , fmt .Errorf ("error creating client: %v" , err .Error ())
520
520
}
You can’t perform that action at this time.
0 commit comments