diff --git a/pkg/services/govmomi/vcenter/clone_test.go b/pkg/services/govmomi/vcenter/clone_test.go index 7238ca83bf..17406d82bb 100644 --- a/pkg/services/govmomi/vcenter/clone_test.go +++ b/pkg/services/govmomi/vcenter/clone_test.go @@ -142,11 +142,6 @@ func initSimulator(t *testing.T) (*simulator.Model, *session.Session, *simulator server := model.Service.NewServer() pass, _ := server.URL.User.Password() - //authSession, err := session.GetOrCreate( - // session.NewSessionContext(ctx.TODO(), klogr.New()), - // server.URL.Host, "", - // server.URL.User.Username(), pass, "", - // session.DefaultFeature()) authSession, err := session.GetOrCreate( session.NewSessionContext(ctx.TODO(), klogr.New()), session.NewParams(). diff --git a/pkg/session/session.go b/pkg/session/session.go index d193a1064a..2710e8ac65 100644 --- a/pkg/session/session.go +++ b/pkg/session/session.go @@ -117,7 +117,6 @@ func GetOrCreate(ctx Context, params *Params) (*Session, error) { sessionMU.Lock() defer sessionMU.Unlock() - sessionKey := params.server + params.userinfo.Username() + params.datacenter if session, ok := sessionCache[sessionKey]; ok { // if keepalive is enabled we depend upon roundtripper to reestablish the connection // and remove the key if it could not