MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / handleTreeGetSingle

Method handleTreeGetSingle

test/tsd/TestTreeRpc.java:164–175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

162 }
163
164 @Test
165 public void handleTreeGetSingle() throws Exception {
166 setupStorage();
167 HttpQuery query = NettyMocks.getQuery(tsdb,
168 "/api/tree?treeid=2");
169 rpc.execute(tsdb, query);
170 assertEquals(HttpResponseStatus.OK, query.response().getStatus());
171 assertTrue(query.response().getContent().toString(MockBase.ASCII())
172 .contains("\"name\":\"2nd Tree\""));
173 assertFalse(query.response().getContent().toString(MockBase.ASCII())
174 .contains("\"name\":\"Test Tree\""));
175 }
176
177 @Test (expected = BadRequestException.class)
178 public void handleTreeGetNotFound() throws Exception {

Callers

nothing calls this directly

Calls 9

setupStorageMethod · 0.95
getQueryMethod · 0.95
ASCIIMethod · 0.95
responseMethod · 0.80
containsMethod · 0.80
executeMethod · 0.65
getStatusMethod · 0.65
toStringMethod · 0.45
getContentMethod · 0.45

Tested by

no test coverage detected