@@ -111,12 +111,12 @@ func (s *ClientSuite) TestNewUnexpectedError(c *C) {
111
111
112
112
func (s * ClientSuite ) Test_newSession (c * C ) {
113
113
cl := NewClientWithOptions (nil , & ClientOptions {
114
- CacheMaxEntries : 2 ,
114
+ CacheMaxEntries : 3 ,
115
115
}).(* client )
116
116
117
- insecureEP := s .Endpoint
117
+ insecureEP := * s .Endpoint
118
118
insecureEP .InsecureSkipTLS = true
119
- session , err := newSession (cl , insecureEP , nil )
119
+ session , err := newSession (cl , & insecureEP , nil )
120
120
c .Assert (err , IsNil )
121
121
122
122
sessionTransport := session .client .Transport .(* http.Transport )
@@ -131,7 +131,7 @@ func (s *ClientSuite) Test_newSession(c *C) {
131
131
132
132
caEndpoint := insecureEP
133
133
caEndpoint .CaBundle = []byte ("this is the way" )
134
- session , err = newSession (cl , caEndpoint , nil )
134
+ session , err = newSession (cl , & caEndpoint , nil )
135
135
c .Assert (err , IsNil )
136
136
137
137
sessionTransport = session .client .Transport .(* http.Transport )
@@ -146,7 +146,7 @@ func (s *ClientSuite) Test_newSession(c *C) {
146
146
// cached transport should be the one that's used.
147
147
c .Assert (sessionTransport , Equals , t )
148
148
149
- session , err = newSession (cl , caEndpoint , nil )
149
+ session , err = newSession (cl , & caEndpoint , nil )
150
150
c .Assert (err , IsNil )
151
151
sessionTransport = session .client .Transport .(* http.Transport )
152
152
// transport that's going to be used should be cached already.
@@ -156,7 +156,7 @@ func (s *ClientSuite) Test_newSession(c *C) {
156
156
157
157
// if the cache does not exist, the transport should still be correctly configured.
158
158
cl .transports = nil
159
- session , err = newSession (cl , insecureEP , nil )
159
+ session , err = newSession (cl , & insecureEP , nil )
160
160
c .Assert (err , IsNil )
161
161
162
162
sessionTransport = session .client .Transport .(* http.Transport )
0 commit comments