(c *C)
| 672 | } |
| 673 | |
| 674 | func (s *ServerSuite) TestFrontendUpdateRoute(c *C) { |
| 675 | e := testutils.NewResponder("hola") |
| 676 | defer e.Close() |
| 677 | |
| 678 | b := MakeBatch(Batch{ |
| 679 | Addr: "localhost:31000", |
| 680 | Route: `Path("/")`, |
| 681 | URL: e.URL, |
| 682 | }) |
| 683 | c.Assert(s.mux.Init(b.Snapshot()), IsNil) |
| 684 | c.Assert(s.mux.Start(), IsNil) |
| 685 | |
| 686 | c.Assert(GETResponse(c, b.FrontendURL("/")), Equals, "hola") |
| 687 | |
| 688 | b.F.Route = `Path("/New")` |
| 689 | |
| 690 | c.Assert(s.mux.UpsertFrontend(b.F), IsNil) |
| 691 | c.Assert(GETResponse(c, b.FrontendURL("/New")), Equals, "hola") |
| 692 | |
| 693 | response, _, err := testutils.Get(MakeURL(b.L, "/")) |
| 694 | c.Assert(err, IsNil) |
| 695 | c.Assert(response.StatusCode, Equals, http.StatusNotFound) |
| 696 | } |
| 697 | |
| 698 | func (s *ServerSuite) TestFrontendRestoreRoute(c *C) { |
| 699 | e := testutils.NewResponder("onestraw") |
nothing calls this directly
no test coverage detected