MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / redirect

Method redirect

test/tsd/TestHttpQuery.java:996–1005  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

994 }
995
996 @Test
997 public void redirect() {
998 HttpQuery query = NettyMocks.getQuery(tsdb, "/");
999 query.redirect("/redirect");
1000 assertEquals(HttpResponseStatus.OK, query.response().getStatus());
1001 assertEquals("/redirect", query.response().headers().get("Location"));
1002 assertEquals("<html></head><meta http-equiv=\"refresh\" content=\"0; url="
1003 + "/redirect\"></head></html>",
1004 query.response().getContent().toString(Charset.forName("UTF-8")));
1005 }
1006
1007 @Test (expected = NullPointerException.class)
1008 public void redirectNull() {

Callers

nothing calls this directly

Calls 7

getQueryMethod · 0.95
redirectMethod · 0.95
responseMethod · 0.80
getStatusMethod · 0.65
getMethod · 0.45
toStringMethod · 0.45
getContentMethod · 0.45

Tested by

no test coverage detected