You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by ja...@apache.org on 2014/07/13 03:25:38 UTC
[1/3] BIGTOP-1342. Make TestCLI usable for both HDFS and HCFS
Repository: bigtop
Updated Branches:
refs/heads/master 3daaf982c -> f0bab0355
http://git-wip-us.apache.org/repos/asf/bigtop/blob/f0bab035/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHDFSConf.xml
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHDFSConf.xml b/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHDFSConf.xml
index d9bb51e..a1257a8 100644
--- a/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHDFSConf.xml
+++ b/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHDFSConf.xml
@@ -22,7 +22,7 @@
<!-- Normal mode is test. To run just the commands and dump the output
to the log, set it to nocompare -->
<mode>test</mode>
-
+
<!-- Comparator types:
ExactComparator
SubstringComparator
@@ -37,59 +37,16 @@
test-id not renumbered after test removal.
-->
<tests>
- <!-- Tests for ls -->
- <test> <!-- TESTED test-id=1 -->
- <description>ls: file using absolute path</description>
- <test-commands>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
- <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm TEST_DIR_ABSOLUTE/file1</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>TokenComparator</type>
- <expected-output>Found 1 items</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/file1</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=2 -->
- <description>ls: file using relative path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p dir</command>
- <command>-fs NAMENODE -touchz file1</command>
- <command>-fs NAMENODE -ls file1</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm file1</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>TokenComparator</type>
- <expected-output>Found 1 items</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=3 -->
- <description>ls: files using globbing</description>
+
+ <test> <!-- TESTEDtest-id=242 -->
+ <description>checksum: checksum of files(relative path) using globbing</description>
<test-commands>
- <command>-fs NAMENODE -mkdir -p dir</command>
- <command>-fs NAMENODE -touchz file1</command>
- <command>-fs NAMENODE -touchz file2</command>
- <command>-fs NAMENODE -touchz file3</command>
- <command>-fs NAMENODE -touchz file4</command>
- <command>-fs NAMENODE -ls file*</command>
+ <command>-fs NAMENODE -mkdir -p dir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
+ <command>-fs NAMENODE -checksum dir0/data*</command>
</test-commands>
<cleanup-commands>
<command>-fs NAMENODE -rm -r /user/USER_NAME/*</command>
@@ -97,12545 +54,243 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
+ <expected-output>^dir0/data120bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000a58cdc3c0967fc8cddb7fed5960d06f2</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
+ <expected-output>^dir0/data15bytes\tMD5-of-0MD5-of-512CRC32C\t0000020000000000000000007267e9528002723a30939aefc238d665</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=4 -->
- <description>ls: directory using absolute path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir1</command>
- <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir1</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>TokenComparator</type>
- <expected-output>Found 1 items</expected-output>
+ <expected-output>^dir0/data30bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000fc09371298117c4943cf089b4bd79c96</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir1</expected-output>
+ <expected-output>^dir0/data60bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000009476431d851dd7b0a8d057a404d7b9</expected-output>
</comparator>
</comparators>
</test>
-
- <test> <!-- TESTED test-id=5 -->
- <description>ls: directory using relative path</description>
+
+ <test> <!-- TESTEDtest-id=294 -->
+ <description>stat: statistics about directory(absolute path)</description>
<test-commands>
- <command>-fs NAMENODE -mkdir -p dir1</command>
- <command>-fs NAMENODE -ls </command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dirtest</command>
+ <command>-fs NAMENODE -stat "%n-%b-%o" TEST_DIR_ABSOLUTE/dirtest</command>
</test-commands>
<cleanup-commands>
- <command>-fs NAMENODE -rm -r /user/USER_NAME/dir1</command>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dirtest</command>
</cleanup-commands>
<comparators>
<comparator>
<type>TokenComparator</type>
- <expected-output>Found 1 items</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir1</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=6 -->
- <description>ls: directory using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p dir1</command>
- <command>-fs NAMENODE -mkdir -p dir2</command>
- <command>-fs NAMENODE -mkdir -p dir3</command>
- <command>-fs NAMENODE -mkdir -p dir4</command>
- <command>-fs NAMENODE -ls </command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r /user/USER_NAME/*</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir3</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir4</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=7 -->
- <description>ls: file/directory that does not exist in TEST_DIR_ABSOLUTE</description>
- <test-commands>
- <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^ls: `TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=8 xxx -->
- <description>ls: file/directory that does not exist in home directory (/user/username)</description>
- <test-commands>
- <!--<command>-fs NAMENODE -ls file1</command>-->
- <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^ls: `TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
+ <expected-output>dirtest-0-0</expected-output>
</comparator>
</comparators>
</test>
- <test> <!-- TESTED test-id=9 -->
- <description>ls: Non-URI input file at Namenode's path</description>
+ <test> <!-- TESTEDtest-id=295 -->
+ <description>stat: statistics about directory(relative path)</description>
<test-commands>
- <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/file1</command>
- <command>-fs NAMENODE -ls NAMENODETEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -mkdir -p dirtest</command>
+ <command>-fs NAMENODE -stat "%n-%b-%o" dirtest</command>
</test-commands>
<cleanup-commands>
- <command>-fs NAMENODE -rm NAMENODETEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -rm -r /user/USER_NAME/*</command>
</cleanup-commands>
<comparators>
<comparator>
<type>TokenComparator</type>
- <expected-output>Found 1 items</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/file1</expected-output>
+ <expected-output>dirtest-0-0</expected-output>
</comparator>
</comparators>
</test>
- <test> <!-- TESTED test-id=10 -->
- <description>ls: file at hdfs:// path</description>
+ <test> <!-- TESTEDtest-id=296 -->
+ <description>stat: statistics about files (absolute path) using globbing</description>
<test-commands>
- <command>-fs NAMENODE -touchz hdfs://TEST_DIR_ABSOLUTE/file1</command>
- <command>-fs NAMENODE -ls hdfs://TEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/data120bytes</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/datadir</command>
+ <command>-fs NAMENODE -stat "%n-%b" TEST_DIR_ABSOLUTE/dir0/data*</command>
</test-commands>
<cleanup-commands>
- <command>-fs NAMENODE -rm hdfs://TEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
</cleanup-commands>
<comparators>
<comparator>
<type>TokenComparator</type>
- <expected-output>Found 1 items</expected-output>
+ <expected-output>"data15bytes-15"</expected-output>
</comparator>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs://TEST_DIR_ABSOLUTE/file1</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data30bytes-30"</expected-output>
</comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=11 -->
- <description>ls: Non-URI input file at Namenode's path using globing</description>
- <test-commands>
- <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/file1</command>
- <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/file2</command>
- <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/file3</command>
- <command>-fs NAMENODE -ls NAMENODETEST_DIR_ABSOLUTE/file*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm NAMENODETEST_DIR_ABSOLUTE/file*</command>
- </cleanup-commands>
- <comparators>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/file1</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data60bytes-60"</expected-output>
</comparator>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/file2</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data120bytes-120"</expected-output>
</comparator>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/file3</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"datadir-0"</expected-output>
</comparator>
</comparators>
</test>
- <test> <!-- TESTED test-id=12 -->
- <description>ls: file at hdfs:// path using globing</description>
+ <test> <!-- TESTEDtest-id=297 -->
+ <description>stat: statistics about files (relative path) using globbing</description>
<test-commands>
- <command>-fs NAMENODE -touchz hdfs://TEST_DIR_ABSOLUTE/file1</command>
- <command>-fs NAMENODE -touchz hdfs://TEST_DIR_ABSOLUTE/file2</command>
- <command>-fs NAMENODE -touchz hdfs://TEST_DIR_ABSOLUTE/file3</command>
- <command>-fs NAMENODE -ls hdfs://TEST_DIR_ABSOLUTE/file*</command>
+ <command>-fs NAMENODE -mkdir -p dir</command>
+ <command>-fs NAMENODE -touchz test</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
+ <command>-fs NAMENODE -mkdir -p datadir</command>
+ <command>-fs NAMENODE -stat "%n-%b" data*</command>
</test-commands>
<cleanup-commands>
- <command>-fs NAMENODE -rm hdfs://TEST_DIR_ABSOLUTE/file*</command>
+ <command>-fs NAMENODE -rm -r /user/USER_NAME/*</command>
</cleanup-commands>
<comparators>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs://TEST_DIR_ABSOLUTE/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs://TEST_DIR_ABSOLUTE/file2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs://TEST_DIR_ABSOLUTE/file3</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data15bytes-15"</expected-output>
</comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=13 xxx -->
- <description>ls: Non-URI input dir at Namenode's path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p NAMENODE/user/USER_NAME/dir1</command>
- <command>-fs NAMENODE -ls hdfs:///user/USER_NAME</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm hdfs:///user/USER_NAME/dir1</command>
- </cleanup-commands>
- <comparators>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>Found [0-9] items</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data30bytes-30"</expected-output>
</comparator>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/USER_NAME/dir1</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data60bytes-60"</expected-output>
</comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=14 -->
- <description>ls: dir at hdfs:// path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p hdfs:///user/USER_NAME/dir1</command>
- <command>-fs NAMENODE -ls hdfs:///user/USER_NAME</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm hdfs:///user/USER_NAME/dir1</command>
- </cleanup-commands>
- <comparators>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>Found [0-9] items</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data120bytes-120"</expected-output>
</comparator>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/USER_NAME/dir1</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"datadir-0"</expected-output>
</comparator>
</comparators>
</test>
- <test> <!-- TESTED test-id=15 -->
- <description>ls: Non-URI input dir at Namenode's path using globing</description>
+ <test> <!-- TESTEDtest-id=301 -->
+ <description>stat: Test for HCFS_SCHEME// path - statistics about directory</description>
<test-commands>
- <command>-fs NAMENODE -mkdir -p NAMENODE/user/USER_NAME/dir1</command>
- <command>-fs NAMENODE -mkdir -p NAMENODE/user/USER_NAME/dir2</command>
- <command>-fs NAMENODE -mkdir -p NAMENODE/user/USER_NAME/dir3</command>
- <command>-fs NAMENODE -ls hdfs:///user/USER_NAME</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dirtest</command>
+ <command>-fs NAMENODE -stat "%n-%b-%o" HCFS_SCHEME//TEST_DIR_ABSOLUTE/dirtest</command>
</test-commands>
<cleanup-commands>
- <command>-fs NAMENODE -rm hdfs:///user/USER_NAME/dir*</command>
+ <command>-fs NAMENODE -rm -r HCFS_SCHEME//TEST_DIR_ABSOLUTE/dirtest</command>
</cleanup-commands>
<comparators>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>Found [0-9] items</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/USER_NAME/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/USER_NAME/dir2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/USER_NAME/dir3</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>dirtest-0-0</expected-output>
</comparator>
</comparators>
</test>
- <test> <!-- TESTED test-id=16 -->
- <description>ls: dir at hdfs:// path using globing</description>
+ <test> <!-- TESTEDtest-id=302 -->
+ <description>stat: Test for HCFS_SCHEME// path - statistics about files using globbing</description>
<test-commands>
- <command>-fs NAMENODE -mkdir -p hdfs:///user/USER_NAME/dir1</command>
- <command>-fs NAMENODE -mkdir -p hdfs:///user/USER_NAME/dir2</command>
- <command>-fs NAMENODE -mkdir -p hdfs:///user/USER_NAME/dir3</command>
- <command>-fs NAMENODE -ls hdfs:///user/USER_NAME</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data120bytes</command>
+ <command>-fs NAMENODE -mkdir -p HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/datadir</command>
+ <command>-fs NAMENODE -stat "%n-%b" HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data*</command>
</test-commands>
<cleanup-commands>
- <command>-fs NAMENODE -rm hdfs:///user/USER_NAMEdir*</command>
+ <command>-fs NAMENODE -rm -r HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
</cleanup-commands>
<comparators>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>Found [0-9] items</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data15bytes-15"</expected-output>
</comparator>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/USER_NAME/dir1</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data30bytes-30"</expected-output>
</comparator>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/USER_NAME/dir2</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data60bytes-60"</expected-output>
</comparator>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs:///user/USER_NAME/dir3</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data120bytes-120"</expected-output>
</comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=17 -->
- <description>ls: non-existent file/directory at hdfs:// path </description>
- <test-commands>
- <command>-fs NAMENODE -ls hdfs://TEST_DIR_ABSOLUTE/file1</command>
- </test-commands>
- <cleanup-commands>
- <!-- no cleanup -->
- </cleanup-commands>
- <comparators>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^ls: `hdfs://TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"datadir-0"</expected-output>
</comparator>
</comparators>
</test>
- <test> <!-- TESTED test-id=18 -->
- <description>ls: non-existent file/directory in Namenode's path </description>
+ <test> <!-- TESTEDtest-id=305 -->
+ <description>stat: Test for Namenode's path - statistics about directory</description>
<test-commands>
- <command>-fs NAMENODE -ls NAMENODETEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dirtest</command>
+ <command>-fs NAMENODE -stat "%n-%b-%o" NAMENODETEST_DIR_ABSOLUTE/dirtest</command>
</test-commands>
<cleanup-commands>
- <!-- no cleanup -->
+ <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/dirtest</command>
</cleanup-commands>
<comparators>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*(:[0-9]+)?TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>dirtest-0-0</expected-output>
</comparator>
</comparators>
</test>
- <!-- Tests for ls -R -->
- <test> <!-- TESTED test-id=19 -->
- <description>ls: files/directories using absolute path</description>
+ <test> <!-- TESTEDtest-id=306 -->
+ <description>stat: Test for Namenode's path - statistics about files using globbing</description>
<test-commands>
<command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file0</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/file2</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir2/file1</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir2/file2</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/dir1/file1</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/dir1/file2</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir2/dir2/file1</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir2/dir2/file2</command>
- <command>-fs NAMENODE -ls -R TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data120bytes</command>
+ <command>-fs NAMENODE -mkdir -p NAMENODETEST_DIR_ABSOLUTE/dir0/datadir</command>
+ <command>-fs NAMENODE -stat "%n-%b" NAMENODETEST_DIR_ABSOLUTE/dir0/data*</command>
</test-commands>
<cleanup-commands>
- <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/dir0</command>
</cleanup-commands>
<comparators>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data15bytes-15"</expected-output>
</comparator>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data30bytes-30"</expected-output>
</comparator>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/dir1</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data60bytes-60"</expected-output>
</comparator>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/dir2</expected-output>
+ <type>TokenComparator</type>
+ <expected-output>"data120bytes-120"</expected-output>
</comparator>
<comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2/dir2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/file0</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/file2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2/file2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/dir1/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/dir1/file2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2/dir2/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2/dir2/file2</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=20 -->
- <description>ls: files/directories using relative path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p dir0</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
- <command>-fs NAMENODE -touchz dir0/file0</command>
- <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
- <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
- <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
- <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
- <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
- <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
- <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
- <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
- <command>-fs NAMENODE -ls -R dir0</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r /user/USER_NAME/*</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file2</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=21 -->
- <description>ls: files/directories using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p dir0</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
- <command>-fs NAMENODE -touchz dir0/file0</command>
- <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
- <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
- <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
- <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
- <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
- <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
- <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
- <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
- <command>-fs NAMENODE -ls -R dir0/*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/user</command>
- </cleanup-commands>
- <comparators>
- <!-- JIRA?
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^/user/[a-z]*TEST_DIR_ABSOLUTE/dir0/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^/user/[a-z]*TEST_DIR_ABSOLUTE/dir0/dir2</expected-output>
- </comparator>
- -->
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file2</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file2</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=22 -->
- <description>ls: file/directory that does not exist in /</description>
- <test-commands>
- <command>-fs NAMENODE -ls -R TEST_DIR_ABSOLUTE/file1</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^ls: `TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=23 -->
- <description>ls: file/directory that does not exist in home directory (/user/username)</description>
- <test-commands>
- <command>-fs NAMENODE -ls -R TEST_DIR_ABSOLUTE/user</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^ls: `TEST_DIR_ABSOLUTE/user': No such file or directory</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=24 -->
- <description>ls: dir at hdfs:// path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir1</command>
- <command>-fs NAMENODE -touchz hdfs://TEST_DIR_ABSOLUTE/file1</command>
- <command>-fs NAMENODE -touchz hdfs://TEST_DIR_ABSOLUTE/dir0/file1</command>
- <command>-fs NAMENODE -touchz hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
- <command>-fs NAMENODE -ls -R hdfs://TEST_DIR_ABSOLUTE/</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -rm hdfs://TEST_DIR_ABSOLUTE/file1</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs://TEST_DIR_ABSOLUTE/dir0</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs://TEST_DIR_ABSOLUTE/dir0/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs://TEST_DIR_ABSOLUTE/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs://TEST_DIR_ABSOLUTE/dir0/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/file1</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=25 -->
- <description>ls: files/directories in hdfs:// path using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir1</command>
- <command>-fs NAMENODE -touchz hdfs://TEST_DIR_ABSOLUTE/dir0/file1</command>
- <command>-fs NAMENODE -touchz hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
- <command>-fs NAMENODE -ls -R hdfs://TEST_DIR_ABSOLUTE/dir0/*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs://TEST_DIR_ABSOLUTE/dir0/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/file1</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=26 -->
- <description>ls: Non-existent file/directory in hdfs:// path</description>
- <test-commands>
- <command>-fs NAMENODE -ls -R hdfs://TEST_DIR_ABSOLUTE/file1</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^ls: `hdfs://TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=27 -->
- <description>ls: dir at Namenode's path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1</command>
- <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/file1</command>
- <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/dir0/file1</command>
- <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
- <command>-fs NAMENODE -ls -R NAMENODETEST_DIR_ABSOLUTE/</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -rm hdfs://TEST_DIR_ABSOLUTE/file1</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/dir0</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/dir0/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/dir0/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/file1</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=28 -->
- <description>ls: Non-URI input files/directories in Namenode's path </description>
- <test-commands>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1</command>
- <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/dir0/file1</command>
- <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
- <command>-fs NAMENODE -ls -R NAMENODETEST_DIR_ABSOLUTE/dir0/*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/dir0/file1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/file1</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=29 -->
- <description>ls: Non-URI input for non-existent file/directory in Namenode's path </description>
- <test-commands>
- <command>-fs NAMENODE -ls -R NAMENODETEST_DIR_ABSOLUTE/file1</command>
- </test-commands>
- <cleanup-commands>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^ls: `hdfs://\w+[-.a-z0-9]*(:[0-9]+)?TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=30 -->
- <description>ls: Negative test for quoted /*/* globbing </description>
- <test-commands>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
- <command>-fs NAMENODE -ls -R TEST_DIR_ABSOLUTE/\*/\*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>TokenComparator</type>
- <expected-output>ls: `TEST_DIR_ABSOLUTE/*/*': No such file or directory</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=31 -->
- <description>ls: Test for quoted globbing </description>
- <test-commands>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/\*</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/\*/file</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
- <command>-fs NAMENODE -ls -R TEST_DIR_ABSOLUTE/dir0/\*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/\*/file</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=32 -->
- <description>rm: Test for quoted globbing </description>
- <test-commands>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/\*</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/\*/file</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
- <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0/\*</command>
- <command>-fs NAMENODE -ls -R TEST_DIR_ABSOLUTE/dir0</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/file1</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <!-- Tests for du -->
- <test> <!-- TESTED test-id=33 -->
- <description>du: file using absolute path</description>
- <test-commands>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/data15bytes</command>
- <command>-fs NAMENODE -du TEST_DIR_ABSOLUTE/data15bytes</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm TEST_DIR_ABSOLUTE/data15bytes</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15\s+TEST_DIR_ABSOLUTE/data15bytes</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=34 -->
- <description>du: file using relative path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytesZZ</command>
- <command>-fs NAMENODE -du data15bytesZZ</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm data15bytesZZ</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15\s+data15bytesZZ</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=35 -->
- <description>du: files using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p CLITEST_DATA</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
- <command>-fs NAMENODE -du data*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm data*bytes</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^120\s+data120bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15\s+data15bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^30\s+data30bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^60\s+data60bytes</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=36 -->
- <description>du: directory using absolute path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
- <command>-fs NAMENODE -du TEST_DIR_ABSOLUTE/dir0</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15\s+TEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=37 -->
- <description>du: directory using relative path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p dir0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
- <command>-fs NAMENODE -du dir0</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r /user/USER_NAME/*</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15\s+dir0/data15bytes</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=38 -->
- <description>du: directory using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/data120bytes</command>
- <command>-fs NAMENODE -du TEST_DIR_ABSOLUTE/dir0/*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15( |\t)*TEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^30( |\t)*TEST_DIR_ABSOLUTE/dir0/data30bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^60( |\t)*TEST_DIR_ABSOLUTE/dir0/data60bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^120( |\t)*TEST_DIR_ABSOLUTE/dir0/data120bytes</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=39 -->
- <description>du: Test for hdfs:// path - file</description>
- <test-commands>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs://TEST_DIR_ABSOLUTE/data15bytes</command>
- <command>-fs NAMENODE -du hdfs://TEST_DIR_ABSOLUTE/data15bytes</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm hdfs://TEST_DIR_ABSOLUTE/data15bytes</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15\s+hdfs://TEST_DIR_ABSOLUTE/data15bytes</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=40 -->
- <description>du: Test for hdfs:// path - files using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs://TEST_DIR_ABSOLUTE/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs://TEST_DIR_ABSOLUTE/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs://TEST_DIR_ABSOLUTE/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs://TEST_DIR_ABSOLUTE/data120bytes</command>
- <command>-fs NAMENODE -du hdfs://TEST_DIR_ABSOLUTE/data*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r hdfs://TEST_DIR_ABSOLUTE/*</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^120\s+hdfs://TEST_DIR_ABSOLUTE/data120bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15\s+hdfs://TEST_DIR_ABSOLUTE/data15bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^30\s+hdfs://TEST_DIR_ABSOLUTE/data30bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^60\s+hdfs://TEST_DIR_ABSOLUTE/data60bytes</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=41 -->
- <description>du: Test for hdfs:// path - directory</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs://TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
- <command>-fs NAMENODE -du hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15\s+hdfs://TEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=42 -->
- <description>duh: Test for hdfs:// path - directory</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs://TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data1k hdfs://TEST_DIR_ABSOLUTE/dir0/data1k</command>
- <command>-fs NAMENODE -du -h hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15\s+hdfs://TEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^1\.0 K\s+hdfs://TEST_DIR_ABSOLUTE/dir0/data1k</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=43 -->
- <description>du: Test for hdfs:// path - directory using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs://TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs://TEST_DIR_ABSOLUTE/dir0/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs://TEST_DIR_ABSOLUTE/dir0/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs://TEST_DIR_ABSOLUTE/dir0/data120bytes</command>
- <command>-fs NAMENODE -du hdfs://TEST_DIR_ABSOLUTE/dir0/*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15( |\t)*hdfs://TEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^30( |\t)*hdfs://TEST_DIR_ABSOLUTE/dir0/data30bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^60( |\t)*hdfs://TEST_DIR_ABSOLUTE/dir0/data60bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^120( |\t)*hdfs://TEST_DIR_ABSOLUTE/dir0/data120bytes</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=44 -->
- <description>du: Test for Namenode's path - file</description>
- <test-commands>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/data15bytes</command>
- <command>-fs NAMENODE -du NAMENODETEST_DIR_ABSOLUTE/data15bytes</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm NAMENODETEST_DIR_ABSOLUTE/data15bytes</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15( |\t)*NAMENODETEST_DIR_ABSOLUTE/data15bytes</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=45 -->
- <description>du: Test for Namenode's path - files using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODETEST_DIR_ABSOLUTE/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODETEST_DIR_ABSOLUTE/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODETEST_DIR_ABSOLUTE/data120bytes</command>
- <command>-fs NAMENODE -du NAMENODETEST_DIR_ABSOLUTE/data*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/*</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15( |\t)*NAMENODETEST_DIR_ABSOLUTE/data15bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^30( |\t)*NAMENODETEST_DIR_ABSOLUTE/data30bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^60( |\t)*NAMENODETEST_DIR_ABSOLUTE/data60bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^120( |\t)*NAMENODETEST_DIR_ABSOLUTE/data120bytes</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=46 -->
- <description>du: Test for Namenode's path - directory</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data15bytes</command>
- <command>-fs NAMENODE -du NAMENODETEST_DIR_ABSOLUTE/dir0</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15( |\t)*NAMENODETEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=47 -->
- <description>du: Test for Namenode's path - directory using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data120bytes</command>
- <command>-fs NAMENODE -du NAMENODETEST_DIR_ABSOLUTE/dir0/*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^15( |\t)*NAMENODETEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^30( |\t)*NAMENODETEST_DIR_ABSOLUTE/dir0/data30bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^60( |\t)*NAMENODETEST_DIR_ABSOLUTE/dir0/data60bytes</expected-output>
- </comparator>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^120( |\t)*NAMENODETEST_DIR_ABSOLUTE/dir0/data120bytes</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <!-- Tests for dus -->
- <test> <!-- TESTED test-id=48 -->
- <description>dus: directories/files using absolute path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
- <command>-fs NAMENODE -du -s TEST_DIR_ABSOLUTE/dir0</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^450\s+TEST_DIR_ABSOLUTE/dir0</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=49 -->
- <description>dus: directories/files using relative path</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir -p dir0</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
- <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
- <command>-fs NAMENODE -touchz dir0/file0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir1/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir2/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir2/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir1/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir1/dir2/data120bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir2/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir2/dir2/data120bytes</command>
- <command>-fs NAMENODE -du -s dir0</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r /user/USER_NAME/*</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^450\s+dir0</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=50 -->
- <description>dus: directories/files using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
- <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/donotcountdir0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
- <command>-fs NAMENODE -du -s TEST_DIR_ABSOLUTE/dir*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/donotcountdir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^450\s+TEST_DIR_ABSOLUTE/dir0</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <!-- Tests for dus -->
- <test> <!-- TESTED test-id=51 -->
- <description>dus: Test for hdfs:// path - directories/files</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir1</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir2</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
- <command>-fs NAMENODE -touchz hdfs://TEST_DIR_ABSOLUTE/dir0/file0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
- <command>-fs NAMENODE -du -s hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^450\s+hdfs://TEST_DIR_ABSOLUTE/dir0</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=52 -->
- <description>dus: Test for hdfs:// path - directories/files using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir1</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir2</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
- <command>-fs NAMENODE -mkdir hdfs://TEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
- <command>-fs NAMENODE -touchz hdfs://TEST_DIR_ABSOLUTE/dir0/file0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes hdfs://TEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
- <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/donotcountdir0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs://TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs://TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs://TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes hdfs://TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
- <command>-fs NAMENODE -du -s hdfs://TEST_DIR_ABSOLUTE/dir*</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r hdfs://TEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -rm -r hdfs://TEST_DIR_ABSOLUTE/donotcountdir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^450\s+hdfs://TEST_DIR_ABSOLUTE/dir0</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=53 -->
- <description>dus: Test for Namenode's path - directories/files</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir2</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
- <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/dir0/file0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
- <command>-fs NAMENODE -du -s NAMENODETEST_DIR_ABSOLUTE/dir0</command>
- </test-commands>
- <cleanup-commands>
- <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/dir0</command>
- </cleanup-commands>
- <comparators>
- <comparator>
- <type>RegexpComparator</type>
- <expected-output>^450\s+NAMENODETEST_DIR_ABSOLUTE/dir0</expected-output>
- </comparator>
- </comparators>
- </test>
-
- <test> <!-- TESTED test-id=54 -->
- <description>dus: Test for Namenode's path - directories/files using globbing</description>
- <test-commands>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir2</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
- <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/dir0/file0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
- <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/donotcountdir0</command>
- <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/donotcountdir0/
<TRUNCATED>
[3/3] git commit: BIGTOP-1342. Make TestCLI usable for both HDFS and
HCFS
Posted by ja...@apache.org.
BIGTOP-1342. Make TestCLI usable for both HDFS and HCFS
This change splits TestCLI code into 2 parts:
* TestCLI using testHCFSConf.xml (cases applicable for any Hadoop filesystem)
* TestHDFSCLI using testHDFSConf.xml (HDFS only cases)
Signed-off-by: jay@apache.org <jayunit100>
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/f0bab035
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/f0bab035
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/f0bab035
Branch: refs/heads/master
Commit: f0bab0355ee2184ccf9a23524683caa4e4b227ec
Parents: 3daaf98
Author: Martin Bukatovic <mb...@redhat.com>
Authored: Wed Jun 18 18:14:05 2014 +0200
Committer: jay@apache.org <jayunit100>
Committed: Sat Jul 12 21:24:56 2014 -0400
----------------------------------------------------------------------
.../bigtop/itest/hadoop/hcfs/FSCmdExecutor.java | 73 +
.../bigtop/itest/hadoop/hcfs/TestCLI.java | 160 +
.../bigtop/itest/hadoop/hdfs/FSCmdExecutor.java | 68 -
.../bigtop/itest/hadoop/hdfs/TestCLI.java | 135 -
.../bigtop/itest/hadoop/hdfs/TestHDFSCLI.java | 32 +
.../resources/clitest_data/testHCFSConf.xml | 12660 +++++++++++++++++
.../resources/clitest_data/testHDFSConf.xml | 12585 +---------------
7 files changed, 13045 insertions(+), 12668 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/f0bab035/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/FSCmdExecutor.java
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/FSCmdExecutor.java b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/FSCmdExecutor.java
new file mode 100644
index 0000000..b5eb9c8
--- /dev/null
+++ b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/FSCmdExecutor.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bigtop.itest.hadoop.hcfs;
+
+import java.io.File;
+import java.util.StringTokenizer;
+
+import org.apache.hadoop.fs.FsShell;
+import org.apache.hadoop.cli.CLITestHelper;
+import org.apache.hadoop.cli.util.CommandExecutor;
+import org.apache.hadoop.util.ToolRunner;
+
+public class FSCmdExecutor extends CommandExecutor {
+ protected String namenode = null;
+ protected FsShell shell = null;
+
+ public FSCmdExecutor(String namenode, FsShell shell) {
+ this.namenode = namenode;
+ this.shell = shell;
+ }
+
+ /**
+ * Execute given hadoop FsShell command.
+ */
+ protected void execute(final String cmd) throws Exception{
+ String[] args = getCommandAsArgs(cmd, "NAMENODE", this.namenode);
+ ToolRunner.run(shell, args);
+ }
+
+ /**
+ * Prapare given FsShell command for execution by ToolRunner.
+ * This method also expands all variables used in the command.
+ */
+ @Override
+ protected String[] getCommandAsArgs(final String cmd, final String masterKey,
+ final String master) {
+ StringTokenizer tokenizer = new StringTokenizer(cmd, " ");
+ String[] args = new String[tokenizer.countTokens()];
+ int i = 0;
+ while (tokenizer.hasMoreTokens()) {
+ args[i] = tokenizer.nextToken();
+ // HCFS fs.default.name Hack (see TestCLI.java)
+ args[i] = args[i].replaceAll("NAMENODETEST_DIR_ABSOLUTE", TestCLI.NAMENODE_TESTDIR_HACK);
+ args[i] = args[i].replaceAll(masterKey, master);
+ args[i] = args[i].replaceAll("CLITEST_DATA",
+ new File(CLITestHelper.TEST_CACHE_DATA_DIR).
+ toURI().toString().replace(' ', '+'));
+ args[i] = args[i].replaceAll("USER_NAME", System.getProperty("user.name"));
+ args[i] = args[i].replaceAll("TEST_DIR_ABSOLUTE", TestCLI.TEST_DIR_ABSOLUTE);
+ args[i] = args[i].replaceAll("HCFS_SCHEME", TestCLI.HCFS_SCHEME);
+ args[i] = args[i].replaceAll("HCFS_DIRSIZE", TestCLI.HCFS_DIRSIZE);
+ args[i] = args[i].replaceAll("HCFS_NNMATCH", TestCLI.HCFS_NNMATCH);
+
+ i++;
+ }
+ return args;
+ }
+}
http://git-wip-us.apache.org/repos/asf/bigtop/blob/f0bab035/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java
new file mode 100644
index 0000000..1b4dcd7
--- /dev/null
+++ b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java
@@ -0,0 +1,160 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bigtop.itest.hadoop.hcfs;
+
+import java.io.File;
+
+import org.apache.hadoop.fs.CommonConfigurationKeys;
+import org.apache.hadoop.fs.FsShell;
+import org.apache.hadoop.cli.CLITestHelper;
+import org.apache.hadoop.cli.util.CLICommand;
+import org.apache.hadoop.cli.util.CLICommandFS;
+import org.apache.hadoop.cli.util.CommandExecutor;
+import org.apache.hadoop.hdfs.DFSConfigKeys;
+import org.apache.hadoop.hdfs.HdfsConfiguration;
+import org.apache.bigtop.itest.shell.Shell;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.Assert;
+
+import org.apache.commons.lang.StringUtils;
+
+/**
+ * Tests for the Command Line Interface (CLI)
+ */
+public class TestCLI extends CLITestHelper {
+ public static final String TEST_DIR_ABSOLUTE = "/tmp/testcli_" + Long.valueOf(System.currentTimeMillis());
+ public static String HCFS_SCHEME;
+ public static String HCFS_DIRSIZE;
+ public static String HCFS_NNMATCH;
+ public static String NAMENODE_TESTDIR_HACK;
+ private String supergroup;
+ private String namenode;
+ private static Shell shHDFS = new Shell("/bin/bash");
+
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ readTestConfigFile();
+
+ // Configuration of real Hadoop cluster
+ conf = new HdfsConfiguration();
+ supergroup = System.getProperty("hcfs.root.groupname",
+ conf.get(DFSConfigKeys.DFS_PERMISSIONS_SUPERUSERGROUP_KEY));
+ namenode = conf.get(CommonConfigurationKeys.FS_DEFAULT_NAME_KEY);
+
+ conf.setBoolean(CommonConfigurationKeys.HADOOP_SECURITY_AUTHORIZATION, true);
+ // Many of the tests expect a replication value of 1 in the output
+ conf.setInt("dfs.replication", 1);
+
+ clitestDataDir = new File(TEST_CACHE_DATA_DIR).toURI().toString().replace(' ', '+');
+
+ String[] createTestcliDirCmds = {
+ "hadoop fs -mkdir -p " + TEST_DIR_ABSOLUTE,
+ "hadoop fs -chmod 777 " + TEST_DIR_ABSOLUTE
+ };
+ shHDFS.exec(createTestcliDirCmds);
+
+ // Check assumptions which would make some cases fail if not met
+ Assert.assertEquals("Creation of testcli dir should succeed and return 0"
+ + " (but it failed with the following error message: "
+ + StringUtils.join(shHDFS.getErr().toArray(), "\\n") + ")",
+ 0, shHDFS.getRet());
+ // We can't just use conf.setInt(fs.trash.interval",0) because if trash is
+ // enabled on the server, client configuration value is ignored.
+ Assert.assertEquals("HDFS trash should be disabled via fs.trash.interval",
+ 0, conf.getInt("fs.trash.interval",0));
+ Assert.assertEquals("This test needs to be run under root user of hcfs",
+ System.getProperty("hcfs.root.username", "hdfs"),
+ System.getProperty("user.name"));
+
+ // Initialize variables from test config file
+ HCFS_SCHEME = System.getProperty("hcfs.scheme", "hdfs:");
+ HCFS_DIRSIZE = System.getProperty("hcfs.dirsize.pattern", "0");
+ HCFS_NNMATCH = System.getProperty("hcfs.namenode.pattern", "\\\\w+[-.a-z0-9]*(:[0-9]+)?");
+
+ // HCFS fs.default.name Hack
+ // Hadoop property 'fs.default.name' usually has value like this one:
+ // "hdfs://namenode_hostname:port". But for other hadoop filesystems, the
+ // value may just end with 3 slashes in a row (eg. 'glusterfs:///' or
+ // 'maprfs:///'). This leads to file paths with 4 slashes in it (eg.
+ // 'glusterfs:////tmp/testcli_sth') which are shortened back to
+ // 'glusterfs:///tmp/...' if the file actually exists. To fix this we just
+ // replace 4 slashes with 3 to prevent this from happening.
+ String namenode_testdir = namenode + TEST_DIR_ABSOLUTE;
+ NAMENODE_TESTDIR_HACK = namenode_testdir.replace(":////", ":///");
+ }
+
+ @After
+ @Override
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+ String removeTestcliDirCmd = "hadoop fs -rm -r " + TEST_DIR_ABSOLUTE;
+ shHDFS.exec(removeTestcliDirCmd);
+ }
+
+ @Override
+ protected String getTestFile() {
+ return "testHCFSConf.xml";
+ }
+
+ @Test
+ @Override
+ public void testAll() {
+ super.testAll();
+ }
+
+ /**
+ * Expand commands from the test config file.
+ * This method is used in displayResults() and compareTestOutput() only,
+ * so it doesn't have any effect on the test execution itself.
+ *
+ * @param cmd
+ * @return String expanded command
+ */
+ @Override
+ protected String expandCommand(final String cmd) {
+ String expCmd = super.expandCommand(cmd);
+ // note: super.expandCommand() expands CLITEST_DATA and USERNAME
+ expCmd = expCmd.replaceAll("NAMENODETEST_DIR_ABSOLUTE", NAMENODE_TESTDIR_HACK);
+ expCmd = expCmd.replaceAll("TEST_DIR_ABSOLUTE", TEST_DIR_ABSOLUTE);
+ expCmd = expCmd.replaceAll("supergroup", supergroup);
+ expCmd = expCmd.replaceAll("NAMENODE", namenode);
+ expCmd = expCmd.replaceAll("USER_NAME", System.getProperty("user.name"));
+ expCmd = expCmd.replaceAll("HCFS_SCHEME", HCFS_SCHEME);
+ expCmd = expCmd.replaceAll("HCFS_DIRSIZE", HCFS_DIRSIZE);
+ expCmd = expCmd.replaceAll("HCFS_NNMATCH", HCFS_NNMATCH);
+ return expCmd;
+ }
+
+ /**
+ * Execute given hadoop FsShell command (via Toolrunner).
+ */
+ @Override
+ protected CommandExecutor.Result execute(CLICommand cmd) throws Exception {
+ if (cmd.getType() instanceof CLICommandFS) {
+ CommandExecutor cmdExecutor = new FSCmdExecutor(namenode, new FsShell(conf));
+ return cmdExecutor.executeCommand(cmd.getCmd());
+ } else {
+ throw new IllegalArgumentException("Unknown type of test command: " + cmd.getType());
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/bigtop/blob/f0bab035/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/FSCmdExecutor.java
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/FSCmdExecutor.java b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/FSCmdExecutor.java
deleted file mode 100644
index 04f0d57..0000000
--- a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/FSCmdExecutor.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.itest.hadoop.hdfs;
-
-import java.io.File;
-import java.util.StringTokenizer;
-
-import org.apache.hadoop.fs.FsShell;
-import org.apache.hadoop.cli.CLITestHelper;
-import org.apache.hadoop.cli.util.CommandExecutor;
-import org.apache.hadoop.util.ToolRunner;
-
-public class FSCmdExecutor extends CommandExecutor {
- protected String namenode = null;
- protected FsShell shell = null;
-
- public FSCmdExecutor(String namenode, FsShell shell) {
- this.namenode = namenode;
- this.shell = shell;
- }
-
- /**
- * Execute given hadoop FsShell command.
- */
- protected void execute(final String cmd) throws Exception{
- String[] args = getCommandAsArgs(cmd, "NAMENODE", this.namenode);
- ToolRunner.run(shell, args);
- }
-
- /**
- * Prapare given FsShell command for execution by ToolRunner.
- * This method also expands all variables used in the command.
- */
- @Override
- protected String[] getCommandAsArgs(final String cmd, final String masterKey,
- final String master) {
- StringTokenizer tokenizer = new StringTokenizer(cmd, " ");
- String[] args = new String[tokenizer.countTokens()];
- int i = 0;
- while (tokenizer.hasMoreTokens()) {
- args[i] = tokenizer.nextToken();
- args[i] = args[i].replaceAll(masterKey, master);
- args[i] = args[i].replaceAll("CLITEST_DATA",
- new File(CLITestHelper.TEST_CACHE_DATA_DIR).
- toURI().toString().replace(' ', '+'));
- args[i] = args[i].replaceAll("USER_NAME", System.getProperty("user.name"));
- args[i] = args[i].replaceAll("TEST_DIR_ABSOLUTE", TestCLI.TEST_DIR_ABSOLUTE);
-
- i++;
- }
- return args;
- }
-}
http://git-wip-us.apache.org/repos/asf/bigtop/blob/f0bab035/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java
deleted file mode 100644
index 8214209..0000000
--- a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestCLI.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.bigtop.itest.hadoop.hdfs;
-
-import java.io.File;
-
-import org.apache.hadoop.fs.CommonConfigurationKeys;
-import org.apache.hadoop.fs.FsShell;
-import org.apache.hadoop.cli.CLITestHelper;
-import org.apache.hadoop.cli.util.CLICommand;
-import org.apache.hadoop.cli.util.CLICommandFS;
-import org.apache.hadoop.cli.util.CommandExecutor;
-import org.apache.hadoop.hdfs.DFSConfigKeys;
-import org.apache.hadoop.hdfs.HdfsConfiguration;
-import org.apache.bigtop.itest.shell.Shell;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.Assert;
-
-import org.apache.commons.lang.StringUtils;
-
-/**
- * Tests for the Command Line Interface (CLI)
- */
-public class TestCLI extends CLITestHelper {
- public static final String TEST_DIR_ABSOLUTE = "/tmp/testcli_" + Long.valueOf(System.currentTimeMillis());
- private String supergroup;
- private String namenode;
- private static Shell shHDFS = new Shell("/bin/bash");
-
- @Before
- @Override
- public void setUp() throws Exception {
- readTestConfigFile();
-
- // Configuration of real Hadoop cluster
- conf = new HdfsConfiguration();
- supergroup = conf.get(DFSConfigKeys.DFS_PERMISSIONS_SUPERUSERGROUP_KEY);
- namenode = conf.get(CommonConfigurationKeys.FS_DEFAULT_NAME_KEY);
-
- conf.setBoolean(CommonConfigurationKeys.HADOOP_SECURITY_AUTHORIZATION, true);
- // Many of the tests expect a replication value of 1 in the output
- conf.setInt("dfs.replication", 1);
-
- clitestDataDir = new File(TEST_CACHE_DATA_DIR).toURI().toString().replace(' ', '+');
-
- String[] createTestcliDirCmds = {
- "hadoop fs -mkdir -p " + TEST_DIR_ABSOLUTE,
- "hadoop fs -chmod 777 " + TEST_DIR_ABSOLUTE
- };
- shHDFS.exec(createTestcliDirCmds);
-
- // Check assumptions which would make some cases fail if not met
- Assert.assertEquals("Creation of testcli dir should succeed and return 0"
- + " (but it failed with the following error message: "
- + StringUtils.join(shHDFS.getErr().toArray(), "\\n") + ")",
- 0, shHDFS.getRet());
- // We can't just use conf.setInt(fs.trash.interval",0) because if trash is
- // enabled on the server, client configuration value is ignored.
- Assert.assertEquals("HDFS trash should be disabled via fs.trash.interval",
- 0, conf.getInt("fs.trash.interval",0));
- Assert.assertEquals("This test needs to be run under root user of hcfs",
- System.getProperty("hcfs.root.username", "hdfs"),
- System.getProperty("user.name"));
- }
-
- @After
- @Override
- public void tearDown() throws Exception {
- super.tearDown();
-
- String removeTestcliDirCmd = "hadoop fs -rm -r " + TEST_DIR_ABSOLUTE;
- shHDFS.exec(removeTestcliDirCmd);
- }
-
- @Override
- protected String getTestFile() {
- return "testHDFSConf.xml";
- }
-
- @Test
- @Override
- public void testAll() {
- super.testAll();
- }
-
- /**
- * Expand commands from the test config file.
- * This method is used in displayResults() and compareTestOutput() only,
- * so it doesn't have any effect on the test execution itself.
- *
- * @param cmd
- * @return String expanded command
- */
- @Override
- protected String expandCommand(final String cmd) {
- String expCmd = super.expandCommand(cmd);
- // note: super.expandCommand() expands CLITEST_DATA and USERNAME
- expCmd = expCmd.replaceAll("TEST_DIR_ABSOLUTE", TEST_DIR_ABSOLUTE);
- expCmd = expCmd.replaceAll("supergroup", supergroup);
- expCmd = expCmd.replaceAll("NAMENODE", namenode);
- expCmd = expCmd.replaceAll("USER_NAME", System.getProperty("user.name"));
- return expCmd;
- }
-
- /**
- * Execute given hadoop FsShell command (via Toolrunner).
- */
- @Override
- protected CommandExecutor.Result execute(CLICommand cmd) throws Exception {
- if (cmd.getType() instanceof CLICommandFS) {
- CommandExecutor cmdExecutor = new FSCmdExecutor(namenode, new FsShell(conf));
- return cmdExecutor.executeCommand(cmd.getCmd());
- } else {
- throw new IllegalArgumentException("Unknown type of test command: " + cmd.getType());
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/bigtop/blob/f0bab035/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestHDFSCLI.java
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestHDFSCLI.java b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestHDFSCLI.java
new file mode 100644
index 0000000..53901e0
--- /dev/null
+++ b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestHDFSCLI.java
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bigtop.itest.hadoop.hdfs;
+
+import org.apache.bigtop.itest.hadoop.hcfs.TestCLI;
+
+/**
+ * HDFS-only tests for the Command Line Interface (CLI)
+ */
+public class TestHDFSCLI extends TestCLI {
+
+ @Override
+ protected String getTestFile() {
+ return "testHDFSConf.xml";
+ }
+
+}
[2/3] BIGTOP-1342. Make TestCLI usable for both HDFS and HCFS
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/bigtop/blob/f0bab035/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHCFSConf.xml
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHCFSConf.xml b/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHCFSConf.xml
new file mode 100644
index 0000000..63b5f51
--- /dev/null
+++ b/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHCFSConf.xml
@@ -0,0 +1,12660 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="testConf.xsl"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<configuration>
+ <!-- Normal mode is test. To run just the commands and dump the output
+ to the log, set it to nocompare -->
+ <mode>test</mode>
+
+ <!-- Comparator types:
+ ExactComparator
+ SubstringComparator
+ RegexpComparator
+ TokenComparator
+ -->
+ <!-- Modified for Bigtop TestCLI tests to work on a real cluster.
+ Added TEST_DIR_ABSOLUTE and USER_NAME variables.
+ Added test-id in comment for easy editing.
+ Removed failing tests.
+ FIXME See BIGTOP-895 for details.
+ test-id not renumbered after test removal.
+ -->
+ <tests>
+ <!-- Tests for ls -->
+ <test> <!-- TESTED test-id=1 -->
+ <description>ls: file using absolute path</description>
+ <test-commands>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm TEST_DIR_ABSOLUTE/file1</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>TokenComparator</type>
+ <expected-output>Found 1 items</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/file1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=2 -->
+ <description>ls: file using relative path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p dir</command>
+ <command>-fs NAMENODE -touchz file1</command>
+ <command>-fs NAMENODE -ls file1</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm file1</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>TokenComparator</type>
+ <expected-output>Found 1 items</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=3 -->
+ <description>ls: files using globbing</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p dir</command>
+ <command>-fs NAMENODE -touchz file1</command>
+ <command>-fs NAMENODE -touchz file2</command>
+ <command>-fs NAMENODE -touchz file3</command>
+ <command>-fs NAMENODE -touchz file4</command>
+ <command>-fs NAMENODE -ls file*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r /user/USER_NAME/*</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file3</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*file4</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=4 -->
+ <description>ls: directory using absolute path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir1</command>
+ <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir1</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>TokenComparator</type>
+ <expected-output>Found 1 items</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=5 -->
+ <description>ls: directory using relative path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p dir1</command>
+ <command>-fs NAMENODE -ls </command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r /user/USER_NAME/dir1</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>TokenComparator</type>
+ <expected-output>Found 1 items</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=6 -->
+ <description>ls: directory using globbing</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p dir1</command>
+ <command>-fs NAMENODE -mkdir -p dir2</command>
+ <command>-fs NAMENODE -mkdir -p dir3</command>
+ <command>-fs NAMENODE -mkdir -p dir4</command>
+ <command>-fs NAMENODE -ls </command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r /user/USER_NAME/*</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir3</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir4</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=7 -->
+ <description>ls: file/directory that does not exist in TEST_DIR_ABSOLUTE</description>
+ <test-commands>
+ <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1</command>
+ </test-commands>
+ <cleanup-commands>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^ls: `TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=8 xxx -->
+ <description>ls: file/directory that does not exist in home directory (/user/username)</description>
+ <test-commands>
+ <!--<command>-fs NAMENODE -ls file1</command>-->
+ <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1</command>
+ </test-commands>
+ <cleanup-commands>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^ls: `TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=9 -->
+ <description>ls: Non-URI input file at Namenode's path</description>
+ <test-commands>
+ <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -ls NAMENODETEST_DIR_ABSOLUTE/file1</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm NAMENODETEST_DIR_ABSOLUTE/file1</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>TokenComparator</type>
+ <expected-output>Found 1 items</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/file1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=10 -->
+ <description>ls: file at HCFS_SCHEME// path</description>
+ <test-commands>
+ <command>-fs NAMENODE -touchz HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -ls HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>TokenComparator</type>
+ <expected-output>Found 1 items</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=11 -->
+ <description>ls: Non-URI input file at Namenode's path using globing</description>
+ <test-commands>
+ <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/file2</command>
+ <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/file3</command>
+ <command>-fs NAMENODE -ls NAMENODETEST_DIR_ABSOLUTE/file*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm NAMENODETEST_DIR_ABSOLUTE/file*</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/file2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/file3</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=12 -->
+ <description>ls: file at HCFS_SCHEME// path using globing</description>
+ <test-commands>
+ <command>-fs NAMENODE -touchz HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -touchz HCFS_SCHEME//TEST_DIR_ABSOLUTE/file2</command>
+ <command>-fs NAMENODE -touchz HCFS_SCHEME//TEST_DIR_ABSOLUTE/file3</command>
+ <command>-fs NAMENODE -ls HCFS_SCHEME//TEST_DIR_ABSOLUTE/file*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm HCFS_SCHEME//TEST_DIR_ABSOLUTE/file*</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME//TEST_DIR_ABSOLUTE/file2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME//TEST_DIR_ABSOLUTE/file3</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=13 xxx -->
+ <description>ls: Non-URI input dir at Namenode's path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p NAMENODE/user/USER_NAME/dir1</command>
+ <command>-fs NAMENODE -ls HCFS_SCHEME///user/USER_NAME</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm HCFS_SCHEME///user/USER_NAME/dir1</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>Found [0-9] items</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME///user/USER_NAME/dir1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=14 -->
+ <description>ls: dir at HCFS_SCHEME// path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p HCFS_SCHEME///user/USER_NAME/dir1</command>
+ <command>-fs NAMENODE -ls HCFS_SCHEME///user/USER_NAME</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm HCFS_SCHEME///user/USER_NAME/dir1</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>Found [0-9] items</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME///user/USER_NAME/dir1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=15 -->
+ <description>ls: Non-URI input dir at Namenode's path using globing</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p NAMENODE/user/USER_NAME/dir1</command>
+ <command>-fs NAMENODE -mkdir -p NAMENODE/user/USER_NAME/dir2</command>
+ <command>-fs NAMENODE -mkdir -p NAMENODE/user/USER_NAME/dir3</command>
+ <command>-fs NAMENODE -ls HCFS_SCHEME///user/USER_NAME</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm HCFS_SCHEME///user/USER_NAME/dir*</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>Found [0-9] items</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME///user/USER_NAME/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME///user/USER_NAME/dir2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME///user/USER_NAME/dir3</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=16 -->
+ <description>ls: dir at HCFS_SCHEME// path using globing</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p HCFS_SCHEME///user/USER_NAME/dir1</command>
+ <command>-fs NAMENODE -mkdir -p HCFS_SCHEME///user/USER_NAME/dir2</command>
+ <command>-fs NAMENODE -mkdir -p HCFS_SCHEME///user/USER_NAME/dir3</command>
+ <command>-fs NAMENODE -ls HCFS_SCHEME///user/USER_NAME</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm HCFS_SCHEME///user/USER_NAMEdir*</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>Found [0-9] items</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME///user/USER_NAME/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME///user/USER_NAME/dir2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME///user/USER_NAME/dir3</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=17 -->
+ <description>ls: non-existent file/directory at HCFS_SCHEME// path </description>
+ <test-commands>
+ <command>-fs NAMENODE -ls HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</command>
+ </test-commands>
+ <cleanup-commands>
+ <!-- no cleanup -->
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^ls: `HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=18 -->
+ <description>ls: non-existent file/directory in Namenode's path </description>
+ <test-commands>
+ <command>-fs NAMENODE -ls NAMENODETEST_DIR_ABSOLUTE/file1</command>
+ </test-commands>
+ <cleanup-commands>
+ <!-- no cleanup -->
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^ls: `HCFS_SCHEME//HCFS_NNMATCHTEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <!-- Tests for ls -R -->
+ <test> <!-- TESTED test-id=19 -->
+ <description>ls: files/directories using absolute path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file0</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/file2</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir2/file1</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir2/file2</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/dir1/file1</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/dir1/file2</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir2/dir2/file1</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir2/dir2/file2</command>
+ <command>-fs NAMENODE -ls -R TEST_DIR_ABSOLUTE/dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/dir2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2/dir2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/file0</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/file2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2/file2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/dir1/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/dir1/file2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2/dir2/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir2/dir2/file2</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=20 -->
+ <description>ls: files/directories using relative path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p dir0</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
+ <command>-fs NAMENODE -touchz dir0/file0</command>
+ <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
+ <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
+ <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
+ <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
+ <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
+ <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
+ <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
+ <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
+ <command>-fs NAMENODE -ls -R dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r /user/USER_NAME/*</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file2</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=21 -->
+ <description>ls: files/directories using globbing</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p dir0</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
+ <command>-fs NAMENODE -touchz dir0/file0</command>
+ <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
+ <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
+ <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
+ <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
+ <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
+ <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
+ <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
+ <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
+ <command>-fs NAMENODE -ls -R dir0/*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/user</command>
+ </cleanup-commands>
+ <comparators>
+ <!-- JIRA?
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^/user/[a-z]*TEST_DIR_ABSOLUTE/dir0/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^/user/[a-z]*TEST_DIR_ABSOLUTE/dir0/dir2</expected-output>
+ </comparator>
+ -->
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/file0</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/file2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/file2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir1/dir1/file2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*dir0/dir2/dir2/file2</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=22 -->
+ <description>ls: file/directory that does not exist in /</description>
+ <test-commands>
+ <command>-fs NAMENODE -ls -R TEST_DIR_ABSOLUTE/file1</command>
+ </test-commands>
+ <cleanup-commands>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^ls: `TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=23 -->
+ <description>ls: file/directory that does not exist in home directory (/user/username)</description>
+ <test-commands>
+ <command>-fs NAMENODE -ls -R TEST_DIR_ABSOLUTE/user</command>
+ </test-commands>
+ <cleanup-commands>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^ls: `TEST_DIR_ABSOLUTE/user': No such file or directory</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=24 -->
+ <description>ls: dir at HCFS_SCHEME// path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1</command>
+ <command>-fs NAMENODE -touchz HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -touchz HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/file1</command>
+ <command>-fs NAMENODE -touchz HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
+ <command>-fs NAMENODE -ls -R HCFS_SCHEME//TEST_DIR_ABSOLUTE/</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -rm HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/file1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=25 -->
+ <description>ls: files/directories in HCFS_SCHEME// path using globbing</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1</command>
+ <command>-fs NAMENODE -touchz HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/file1</command>
+ <command>-fs NAMENODE -touchz HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
+ <command>-fs NAMENODE -ls -R HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/file1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=26 -->
+ <description>ls: Non-existent file/directory in HCFS_SCHEME// path</description>
+ <test-commands>
+ <command>-fs NAMENODE -ls -R HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</command>
+ </test-commands>
+ <cleanup-commands>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^ls: `HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=27 -->
+ <description>ls: dir at Namenode's path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1</command>
+ <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/dir0/file1</command>
+ <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
+ <command>-fs NAMENODE -ls -R NAMENODETEST_DIR_ABSOLUTE/</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -rm HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/dir0</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/dir0/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/dir0/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/file1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=28 -->
+ <description>ls: Non-URI input files/directories in Namenode's path </description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1</command>
+ <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/dir0/file1</command>
+ <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
+ <command>-fs NAMENODE -ls -R NAMENODETEST_DIR_ABSOLUTE/dir0/*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/dir0/file1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/file1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=29 -->
+ <description>ls: Non-URI input for non-existent file/directory in Namenode's path </description>
+ <test-commands>
+ <command>-fs NAMENODE -ls -R NAMENODETEST_DIR_ABSOLUTE/file1</command>
+ </test-commands>
+ <cleanup-commands>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^ls: `HCFS_SCHEME//HCFS_NNMATCHTEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=30 -->
+ <description>ls: Negative test for quoted /*/* globbing </description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
+ <command>-fs NAMENODE -ls -R TEST_DIR_ABSOLUTE/\*/\*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>TokenComparator</type>
+ <expected-output>ls: `TEST_DIR_ABSOLUTE/*/*': No such file or directory</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=31 -->
+ <description>ls: Test for quoted globbing </description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/\*</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/\*/file</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
+ <command>-fs NAMENODE -ls -R TEST_DIR_ABSOLUTE/dir0/\*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/\*/file</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=32 -->
+ <description>rm: Test for quoted globbing </description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/\*</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/\*/file</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/dir1/file1</command>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0/\*</command>
+ <command>-fs NAMENODE -ls -R TEST_DIR_ABSOLUTE/dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*HCFS_DIRSIZE( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/dir1/file1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <!-- Tests for du -->
+ <test> <!-- TESTED test-id=33 -->
+ <description>du: file using absolute path</description>
+ <test-commands>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/data15bytes</command>
+ <command>-fs NAMENODE -du TEST_DIR_ABSOLUTE/data15bytes</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm TEST_DIR_ABSOLUTE/data15bytes</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15\s+TEST_DIR_ABSOLUTE/data15bytes</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=34 -->
+ <description>du: file using relative path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p dir</command> <!-- make sure user home dir exists -->
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytesZZ</command>
+ <command>-fs NAMENODE -du data15bytesZZ</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm data15bytesZZ</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15\s+data15bytesZZ</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=35 -->
+ <description>du: files using globbing</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p CLITEST_DATA</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
+ <command>-fs NAMENODE -du data*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm data*bytes</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^120\s+data120bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15\s+data15bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^30\s+data30bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^60\s+data60bytes</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=36 -->
+ <description>du: directory using absolute path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
+ <command>-fs NAMENODE -du TEST_DIR_ABSOLUTE/dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15\s+TEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=37 -->
+ <description>du: directory using relative path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p dir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
+ <command>-fs NAMENODE -du dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r /user/USER_NAME/*</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15\s+dir0/data15bytes</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=38 -->
+ <description>du: directory using globbing</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/data120bytes</command>
+ <command>-fs NAMENODE -du TEST_DIR_ABSOLUTE/dir0/*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15( |\t)*TEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^30( |\t)*TEST_DIR_ABSOLUTE/dir0/data30bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^60( |\t)*TEST_DIR_ABSOLUTE/dir0/data60bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^120( |\t)*TEST_DIR_ABSOLUTE/dir0/data120bytes</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=39 -->
+ <description>du: Test for HCFS_SCHEME// path - file</description>
+ <test-commands>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/data15bytes</command>
+ <command>-fs NAMENODE -du HCFS_SCHEME//TEST_DIR_ABSOLUTE/data15bytes</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm HCFS_SCHEME//TEST_DIR_ABSOLUTE/data15bytes</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15\s+HCFS_SCHEME//TEST_DIR_ABSOLUTE/data15bytes</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=40 -->
+ <description>du: Test for HCFS_SCHEME// path - files using globbing</description>
+ <test-commands>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/data120bytes</command>
+ <command>-fs NAMENODE -du HCFS_SCHEME//TEST_DIR_ABSOLUTE/data*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r HCFS_SCHEME//TEST_DIR_ABSOLUTE/*</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^120\s+HCFS_SCHEME//TEST_DIR_ABSOLUTE/data120bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15\s+HCFS_SCHEME//TEST_DIR_ABSOLUTE/data15bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^30\s+HCFS_SCHEME//TEST_DIR_ABSOLUTE/data30bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^60\s+HCFS_SCHEME//TEST_DIR_ABSOLUTE/data60bytes</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=41 -->
+ <description>du: Test for HCFS_SCHEME// path - directory</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
+ <command>-fs NAMENODE -du HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15\s+HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=42 -->
+ <description>duh: Test for HCFS_SCHEME// path - directory</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data1k HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data1k</command>
+ <command>-fs NAMENODE -du -h HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15\s+HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^1\.0 K\s+HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data1k</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=43 -->
+ <description>du: Test for HCFS_SCHEME// path - directory using globbing</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data120bytes</command>
+ <command>-fs NAMENODE -du HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15( |\t)*HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^30( |\t)*HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data30bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^60( |\t)*HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data60bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^120( |\t)*HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/data120bytes</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=44 -->
+ <description>du: Test for Namenode's path - file</description>
+ <test-commands>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/data15bytes</command>
+ <command>-fs NAMENODE -du NAMENODETEST_DIR_ABSOLUTE/data15bytes</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm NAMENODETEST_DIR_ABSOLUTE/data15bytes</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15( |\t)*NAMENODETEST_DIR_ABSOLUTE/data15bytes</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=45 -->
+ <description>du: Test for Namenode's path - files using globbing</description>
+ <test-commands>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODETEST_DIR_ABSOLUTE/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODETEST_DIR_ABSOLUTE/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODETEST_DIR_ABSOLUTE/data120bytes</command>
+ <command>-fs NAMENODE -du NAMENODETEST_DIR_ABSOLUTE/data*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/*</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15( |\t)*NAMENODETEST_DIR_ABSOLUTE/data15bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^30( |\t)*NAMENODETEST_DIR_ABSOLUTE/data30bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^60( |\t)*NAMENODETEST_DIR_ABSOLUTE/data60bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^120( |\t)*NAMENODETEST_DIR_ABSOLUTE/data120bytes</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=46 -->
+ <description>du: Test for Namenode's path - directory</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data15bytes</command>
+ <command>-fs NAMENODE -du NAMENODETEST_DIR_ABSOLUTE/dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15( |\t)*NAMENODETEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=47 -->
+ <description>du: Test for Namenode's path - directory using globbing</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODETEST_DIR_ABSOLUTE/dir0/data120bytes</command>
+ <command>-fs NAMENODE -du NAMENODETEST_DIR_ABSOLUTE/dir0/*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^15( |\t)*NAMENODETEST_DIR_ABSOLUTE/dir0/data15bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^30( |\t)*NAMENODETEST_DIR_ABSOLUTE/dir0/data30bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^60( |\t)*NAMENODETEST_DIR_ABSOLUTE/dir0/data60bytes</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^120( |\t)*NAMENODETEST_DIR_ABSOLUTE/dir0/data120bytes</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <!-- Tests for dus -->
+ <test> <!-- TESTED test-id=48 -->
+ <description>dus: directories/files using absolute path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
+ <command>-fs NAMENODE -du -s TEST_DIR_ABSOLUTE/dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^450\s+TEST_DIR_ABSOLUTE/dir0</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=49 -->
+ <description>dus: directories/files using relative path</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir -p dir0</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir1</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir1/dir1</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir1/dir2</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir2</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir2/dir1</command>
+ <command>-fs NAMENODE -mkdir -p dir0/dir2/dir2</command>
+ <command>-fs NAMENODE -touchz dir0/file0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir1/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir2/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir2/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir1/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir1/dir2/data120bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir2/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir2/dir2/data120bytes</command>
+ <command>-fs NAMENODE -du -s dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r /user/USER_NAME/*</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^450\s+dir0</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=50 -->
+ <description>dus: directories/files using globbing</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/dir0/file0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes TEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes TEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes TEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/donotcountdir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
+ <command>-fs NAMENODE -du -s TEST_DIR_ABSOLUTE/dir*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/donotcountdir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^450\s+TEST_DIR_ABSOLUTE/dir0</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <!-- Tests for dus -->
+ <test> <!-- TESTED test-id=51 -->
+ <description>dus: Test for HCFS_SCHEME// path - directories/files</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
+ <command>-fs NAMENODE -touchz HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/file0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
+ <command>-fs NAMENODE -du -s HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^450\s+HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=52 -->
+ <description>dus: Test for HCFS_SCHEME// path - directories/files using globbing</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
+ <command>-fs NAMENODE -mkdir HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
+ <command>-fs NAMENODE -touchz HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/file0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/donotcountdir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes HCFS_SCHEME//TEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
+ <command>-fs NAMENODE -du -s HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -rm -r HCFS_SCHEME//TEST_DIR_ABSOLUTE/donotcountdir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^450\s+HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=53 -->
+ <description>dus: Test for Namenode's path - directories/files</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir2</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
+ <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/dir0/file0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
+ <command>-fs NAMENODE -du -s NAMENODETEST_DIR_ABSOLUTE/dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^450\s+NAMENODETEST_DIR_ABSOLUTE/dir0</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=54 -->
+ <description>dus: Test for Namenode's path - directories/files using globbing</description>
+ <test-commands>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir1</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir2</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir2</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir1</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir2</command>
+ <command>-fs NAMENODE -touchz NAMENODETEST_DIR_ABSOLUTE/dir0/file0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data30bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/data30bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir1/dir2/data120bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data60bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir1/data60bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data120bytes NAMENODETEST_DIR_ABSOLUTE/dir0/dir2/dir2/data120bytes</command>
+ <command>-fs NAMENODE -mkdir NAMENODETEST_DIR_ABSOLUTE/donotcountdir0</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
+ <command>-fs NAMENODE -put CLITEST_DATA/data15bytes NAMENODETEST_DIR_ABSOLUTE/donotcountdir0/data15bytes</command>
+ <command>-fs NAMENODE -du -s NAMENODETEST_DIR_ABSOLUTE/dir*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/donotcountdir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^450\s+NAMENODETEST_DIR_ABSOLUTE/dir0</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <!-- Tests for mv -->
+ <test> <!-- TESTED test-id=55 -->
+ <description>mv: file (absolute path) to file (absolute path)</description>
+ <test-commands>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -mv TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/file2</command>
+ <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file*</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm TEST_DIR_ABSOLUTE/file2</command>
+ </cleanup-commands>:
+ <comparators>
+ <comparator>
+ <type>TokenComparator</type>
+ <expected-output>Found 1 items</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/file2</expected-output>
+ </comparator>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/file[^1]</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=56 -->
+ <description>mv: file (absolute path) to file (relative path)</description>
+ <test-commands>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -mv TEST_DIR_ABSOLUTE/file1 file2/file3</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/* /user/USER_NAME/*</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^mv: `file2/file3': No such file or directory</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=57 -->
+ <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination</description>
+ <test-commands>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mv TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -ls -R TEST_DIR_ABSOLUTE/dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/file1</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=58 -->
+ <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination [ TIED to previous test ]</description>
+ <test-commands>
+ <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1</command>
+ </test-commands>
+ <cleanup-commands>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>TokenComparator</type>
+ <expected-output>ls: `TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=59 -->
+ <description>mv: file (absolute path) to directory (absolute path); change the name at the destination</description>
+ <test-commands>
+ <command>-fs NAMENODE -touchz TEST_DIR_ABSOLUTE/file1</command>
+ <command>-fs NAMENODE -mkdir TEST_DIR_ABSOLUTE/dir0</command>
+ <command>-fs NAMENODE -mv TEST_DIR_ABSOLUTE/file1 TEST_DIR_ABSOLUTE/dir0/file2</command>
+ <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/dir0</command>
+ </test-commands>
+ <cleanup-commands>
+ <command>-fs NAMENODE -rm -r TEST_DIR_ABSOLUTE/dir0</command>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>RegexpComparator</type>
+ <expected-output>^-rw-r--r--( )*1( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*TEST_DIR_ABSOLUTE/dir0/file2</expected-output>
+ </comparator>
+ </comparators>
+ </test>
+
+ <test> <!-- TESTED test-id=60 -->
+ <description>mv: file (absolute path) to directory (absolute path); change the name at the destination [ TIED to previous test ]</description>
+ <test-commands>
+ <command>-fs NAMENODE -ls TEST_DIR_ABSOLUTE/file1</command>
+ </test-commands>
+ <cleanup-commands>
+ </cleanup-commands>
+ <comparators>
+ <comparator>
+ <type>TokenComparator</type>
+ <expected-output>ls: `TEST_DIR_ABSOLUTE/file1': No such file or directory</expected-output>
+ </
<TRUNCATED>