@Test public void mkdirShortPathTest() throws IOException { mFsShell.mkdir(new String[] {"mkdir", "/root/testFile1"}); TachyonFile tFile = mTfs.getFile(new TachyonURI("/root/testFile1")); Assert.assertNotNull(tFile); Assert.assertEquals( getCommandOutput(new String[] {"mkdir", "/root/testFile1"}), mOutput.toString()); Assert.assertTrue(tFile.isDirectory()); }
@Test public void mkdirComplexPathTest() throws IOException { mFsShell.mkdir(new String[] {"mkdir", "/Complex!@#$%^&*()-_=+[]{};\"'<>,.?/File"}); TachyonFile tFile = mTfs.getFile(new TachyonURI("/Complex!@#$%^&*()-_=+[]{};\"'<>,.?/File")); Assert.assertNotNull(tFile); Assert.assertEquals( getCommandOutput(new String[] {"mkdir", "/Complex!@#$%^&*()-_=+[]{};\"'<>,.?/File"}), mOutput.toString()); Assert.assertTrue(tFile.isDirectory()); }
@Test public void mkdirTest() throws IOException { String qualifiedPath = "tachyon://" + NetworkAddressUtils.getLocalHostName(Constants.DEFAULT_HOST_RESOLUTION_TIMEOUT_MS) + ":" + mLocalTachyonCluster.getMasterPort() + "/root/testFile1"; mFsShell.mkdir(new String[] {"mkdir", qualifiedPath}); TachyonFile tFile = mTfs.getFile(new TachyonURI("/root/testFile1")); Assert.assertNotNull(tFile); Assert.assertEquals( getCommandOutput(new String[] {"mkdir", qualifiedPath}), mOutput.toString()); Assert.assertTrue(tFile.isDirectory()); }