|
@@ -167,8 +167,9 @@ public class TestRouterAdminCLI {
|
|
assertEquals(0, ToolRunner.run(admin, argv));
|
|
assertEquals(0, ToolRunner.run(admin, argv));
|
|
assertEquals(-1, ToolRunner.run(admin, argv));
|
|
assertEquals(-1, ToolRunner.run(admin, argv));
|
|
|
|
|
|
-
|
|
|
|
stateStore.loadCache(MountTableStoreImpl.class, true);
|
|
stateStore.loadCache(MountTableStoreImpl.class, true);
|
|
|
|
+ verifyMountTableContents(src, dest);
|
|
|
|
+
|
|
GetMountTableEntriesRequest getRequest = GetMountTableEntriesRequest
|
|
GetMountTableEntriesRequest getRequest = GetMountTableEntriesRequest
|
|
.newInstance(src);
|
|
.newInstance(src);
|
|
GetMountTableEntriesResponse getResponse = client.getMountTableManager()
|
|
GetMountTableEntriesResponse getResponse = client.getMountTableManager()
|
|
@@ -207,6 +208,15 @@ public class TestRouterAdminCLI {
|
|
assertTrue(mountTable.isFaultTolerant());
|
|
assertTrue(mountTable.isFaultTolerant());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void verifyMountTableContents(String src, String dest) throws Exception {
|
|
|
|
+ String[] argv = new String[] {"-ls", "/"};
|
|
|
|
+ System.setOut(new PrintStream(out));
|
|
|
|
+ assertEquals(0, ToolRunner.run(admin, argv));
|
|
|
|
+ String response = out.toString();
|
|
|
|
+ assertTrue("The response should have " + src + ": " + response, response.contains(src));
|
|
|
|
+ assertTrue("The response should have " + dest + ": " + response, response.contains(dest));
|
|
|
|
+ }
|
|
|
|
+
|
|
@Test
|
|
@Test
|
|
public void testAddMountTableNotNormalized() throws Exception {
|
|
public void testAddMountTableNotNormalized() throws Exception {
|
|
String nsId = "ns0";
|
|
String nsId = "ns0";
|