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 @@ -518,9 +518,9 @@ func restclientConfig(kubeContext string) (*clientcmdapi.Config, error) {
518
518
type ClientConfigGetter func () (* restclient.Config , error )
519
519
520
520
// LoadConfig returns a config for a rest client with the UserAgent set to include the current test name.
521
- func LoadConfig () (config * restclient.Config , err error ) {
521
+ func LoadConfig (noUserAgent ... bool ) (config * restclient.Config , err error ) {
522
522
defer func () {
523
- if err == nil && config != nil {
523
+ if err == nil && config != nil && len ( noUserAgent ) == 0 {
524
524
testDesc := ginkgo .CurrentSpecReport ()
525
525
if len (testDesc .ContainerHierarchyTexts ) > 0 {
526
526
testName := strings .Join (testDesc .ContainerHierarchyTexts , " " )
@@ -562,8 +562,8 @@ func LoadConfig() (config *restclient.Config, err error) {
562
562
}
563
563
564
564
// LoadClientset returns clientset for connecting to kubernetes clusters.
565
- func LoadClientset () (* clientset.Clientset , error ) {
566
- config , err := LoadConfig ()
565
+ func LoadClientset (noUserAgent ... bool ) (* clientset.Clientset , error ) {
566
+ config , err := LoadConfig (noUserAgent ... )
567
567
if err != nil {
568
568
return nil , fmt .Errorf ("error creating client: %v" , err .Error ())
569
569
}
You can’t perform that action at this time.
0 commit comments