(c *C)
| 191 | } |
| 192 | |
| 193 | func (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 | |
| 220 | func (s *CmdSuite) TestServerCRUD(c *C) { |
| 221 | b := "bk1" |
nothing calls this directly
no test coverage detected