You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by "jinmeiliao (GitHub)" <gi...@apache.org> on 2019/11/26 22:01:01 UTC
[GitHub] [geode] jinmeiliao commented on pull request #4379:
GEODE-7485: REST get index allows dot in index name
I found an easier way to test this, basically we only need to intercept what's been received by the controller, we don't really need to start a real locator/server for that.
We can piggybag on `JsonSerializationTest`, add another test method there:
@Test
public void nameWithDot() throws Exception {
String url = "/v1/regions/region.name/indexes/index.name";
context.perform(get(url)).andExpect(status().isOk());
ArgumentCaptor<Index> argumentCaptor = ArgumentCaptor.forClass(Index.class);
verify(cms).get(argumentCaptor.capture());
Index index = argumentCaptor.getValue();
assertThat(index.getRegionName()).isEqualTo("region.name");
assertThat(index.getId()).isEqualTo("index.name");
}
[ Full content available at: https://github.com/apache/geode/pull/4379 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org