| 218 | } |
| 219 | |
| 220 | func (s *CmdSuite) TestServerCRUD(c *C) { |
| 221 | b := "bk1" |
| 222 | c.Assert(s.run("backend", "upsert", "-id", b), Matches, OK) |
| 223 | srv := "srv1" |
| 224 | c.Assert(s.run("server", "upsert", "-id", srv, "-url", "http://localhost:5000", "-b", b), Matches, OK) |
| 225 | |
| 226 | c.Assert(s.run("server", "ls", "-b", b), Matches, fmt.Sprintf(".*%v.*", "http://localhost:5000")) |
| 227 | c.Assert(s.run("server", "show", "-id", srv, "-b", b), Matches, fmt.Sprintf(".*%v.*", "http://localhost:5000")) |
| 228 | |
| 229 | c.Assert(s.run("server", "rm", "-id", srv, "-b", b), Matches, OK) |
| 230 | c.Assert(s.run("backend", "rm", "-id", b), Matches, OK) |
| 231 | } |
| 232 | |
| 233 | func (s *CmdSuite) TestFrontendCRUD(c *C) { |
| 234 | b := "bk1" |