MCPcopy
hub / github.com/vulcand/vulcand / TestBackendSessionCacheCRUD

Method TestBackendSessionCacheCRUD

vctl/command/command_test.go:193–218  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

191}
192
193func (s *CmdSuite) TestBackendSessionCacheCRUD(c *C) {
194 b := "bk1"
195 c.Assert(s.run("backend", "upsert", "-id", b), Matches, OK)
196 c.Assert(s.run("backend", "ls"), Matches, fmt.Sprintf(".*%s.*", b))
197
198 c.Assert(s.run(
199 "backend", "upsert",
200 "-id", b,
201 // Timeouts
202 "-readTimeout", "1s", "-dialTimeout", "2s", "-handshakeTimeout", "3s",
203 // Keep Alive parameters
204 "-keepAlivePeriod", "4s", "-maxIdleConns", "5",
205 // TLS parameters
206 "-tlsSessionCache=LRU",
207 "-tlsSessionCacheCapacity=1023",
208 ),
209 Matches, OK)
210
211 val, err := s.ng.GetBackend(engine.BackendKey{Id: b})
212 c.Assert(err, IsNil)
213 o := val.HTTPSettings()
214
215 c.Assert(o.TLS.SessionCache.Type, Equals, "LRU")
216 c.Assert(o.TLS.SessionCache.Settings.Capacity, Equals, 1023)
217 c.Assert(s.run("backend", "rm", "-id", b), Matches, OK)
218}
219
220func (s *CmdSuite) TestServerCRUD(c *C) {
221 b := "bk1"

Callers

nothing calls this directly

Calls 3

runMethod · 0.95
GetBackendMethod · 0.65
HTTPSettingsMethod · 0.45

Tested by

no test coverage detected