MCPcopy
hub / github.com/vulcand/vulcand / TestServerUpsertSame

Method TestServerUpsertSame

proxy/mux/mux_test.go:90–107  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

88}
89
90func (s *ServerSuite) TestServerUpsertSame(c *C) {
91 e := testutils.NewResponder("Hi, I'm endpoint")
92 defer e.Close()
93
94 b := MakeBatch(Batch{Addr: "localhost:11300", Route: `Path("/")`, URL: e.URL})
95
96 c.Assert(s.mux.UpsertServer(b.BK, b.S), IsNil)
97 c.Assert(s.mux.UpsertFrontend(b.F), IsNil)
98 c.Assert(s.mux.UpsertListener(b.L), IsNil)
99
100 c.Assert(s.mux.Start(), IsNil)
101
102 c.Assert(GETResponse(c, b.FrontendURL("/")), Equals, "Hi, I'm endpoint")
103
104 c.Assert(s.mux.UpsertServer(b.BK, b.S), IsNil)
105
106 c.Assert(GETResponse(c, b.FrontendURL("/")), Equals, "Hi, I'm endpoint")
107}
108
109func (s *ServerSuite) TestServerDefaultListener(c *C) {
110 e := testutils.NewResponder("Hi, I'm endpoint")

Callers

nothing calls this directly

Calls 8

MakeBatchFunction · 0.85
FrontendURLMethod · 0.80
GETResponseFunction · 0.70
CloseMethod · 0.65
UpsertServerMethod · 0.65
UpsertFrontendMethod · 0.65
UpsertListenerMethod · 0.65
StartMethod · 0.65

Tested by

no test coverage detected