|
@@ -5268,7 +5268,126 @@
|
|
|
</test>
|
|
|
|
|
|
<!-- Tests for getmerge -->
|
|
|
- <!-- Manual Testing -->
|
|
|
+ <test> <!-- TESTED -->
|
|
|
+ <description>getmerge: basic</description>
|
|
|
+ <test-commands>
|
|
|
+ <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -getmerge /user/USERNAME/dir1 CLITEST_DATA/file</command>
|
|
|
+ <command>-cat CLITEST_DATA/file</command>
|
|
|
+ </test-commands>
|
|
|
+ <cleanup-commands>
|
|
|
+ <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
|
|
|
+ <command>rm data</command>
|
|
|
+ </cleanup-commands>
|
|
|
+ <comparators>
|
|
|
+ <comparator>
|
|
|
+ <type>ExactComparator</type>
|
|
|
+ <expected-output>12345678901234
|
|
|
+12345678901234
|
|
|
+12345678901234
|
|
|
+</expected-output>
|
|
|
+ </comparator>
|
|
|
+ </comparators>
|
|
|
+ </test>
|
|
|
+
|
|
|
+ <test> <!-- TESTED -->
|
|
|
+ <description>getmerge: with file</description>
|
|
|
+ <test-commands>
|
|
|
+ <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -getmerge /user/USERNAME/dir1/data15bytes CLITEST_DATA/file</command>
|
|
|
+ <command>-cat CLITEST_DATA/file</command>
|
|
|
+ </test-commands>
|
|
|
+ <cleanup-commands>
|
|
|
+ <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
|
|
|
+ <command>rm data</command>
|
|
|
+ </cleanup-commands>
|
|
|
+ <comparators>
|
|
|
+ <comparator>
|
|
|
+ <type>ExactComparator</type>
|
|
|
+ <expected-output>12345678901234
|
|
|
+</expected-output>
|
|
|
+ </comparator>
|
|
|
+ </comparators>
|
|
|
+ </test>
|
|
|
+
|
|
|
+ <test> <!-- TESTED -->
|
|
|
+ <description>getmerge: with multiple files</description>
|
|
|
+ <test-commands>
|
|
|
+ <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -getmerge /user/USERNAME/dir1/data15bytes /user/USERNAME/dir1/data30bytes CLITEST_DATA/file</command>
|
|
|
+ <command>-cat CLITEST_DATA/file</command>
|
|
|
+ </test-commands>
|
|
|
+ <cleanup-commands>
|
|
|
+ <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
|
|
|
+ <command>rm data</command>
|
|
|
+ </cleanup-commands>
|
|
|
+ <comparators>
|
|
|
+ <comparator>
|
|
|
+ <type>ExactComparator</type>
|
|
|
+ <expected-output>12345678901234
|
|
|
+12345678901234
|
|
|
+12345678901234
|
|
|
+</expected-output>
|
|
|
+ </comparator>
|
|
|
+ </comparators>
|
|
|
+ </test>
|
|
|
+
|
|
|
+ <test> <!-- TESTED -->
|
|
|
+ <description>getmerge: with newlines</description>
|
|
|
+ <test-commands>
|
|
|
+ <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -getmerge -nl /user/USERNAME/dir1 CLITEST_DATA/file</command>
|
|
|
+ <command>-cat CLITEST_DATA/file</command>
|
|
|
+ </test-commands>
|
|
|
+ <cleanup-commands>
|
|
|
+ <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
|
|
|
+ <command>rm data</command>
|
|
|
+ </cleanup-commands>
|
|
|
+ <comparators>
|
|
|
+ <comparator>
|
|
|
+ <type>ExactComparator</type>
|
|
|
+ <expected-output>12345678901234
|
|
|
+
|
|
|
+12345678901234
|
|
|
+12345678901234
|
|
|
+
|
|
|
+</expected-output>
|
|
|
+ </comparator>
|
|
|
+ </comparators>
|
|
|
+ </test>
|
|
|
+
|
|
|
+ <test> <!-- TESTED -->
|
|
|
+ <description>getmerge: with multiple files and newlines</description>
|
|
|
+ <test-commands>
|
|
|
+ <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
|
|
|
+ <command>-fs NAMENODE -getmerge -nl /user/USERNAME/dir1/data15bytes /user/USERNAME/dir1/data30bytes CLITEST_DATA/file</command>
|
|
|
+ <command>-cat CLITEST_DATA/file</command>
|
|
|
+ </test-commands>
|
|
|
+ <cleanup-commands>
|
|
|
+ <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
|
|
|
+ <command>rm data</command>
|
|
|
+ </cleanup-commands>
|
|
|
+ <comparators>
|
|
|
+ <comparator>
|
|
|
+ <type>ExactComparator</type>
|
|
|
+ <expected-output>12345678901234
|
|
|
+
|
|
|
+12345678901234
|
|
|
+12345678901234
|
|
|
+
|
|
|
+</expected-output>
|
|
|
+ </comparator>
|
|
|
+ </comparators>
|
|
|
+ </test>
|
|
|
|
|
|
<!-- Tests for cat -->
|
|
|
<test> <!-- TESTED -->
|
|
@@ -16515,27 +16634,6 @@
|
|
|
</comparators>
|
|
|
</test>
|
|
|
|
|
|
- <test>
|
|
|
- <description>getmerge</description>
|
|
|
- <test-commands>
|
|
|
- <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
|
|
|
- <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
|
|
|
- <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
|
|
|
- <command>-fs NAMENODE -getmerge /user/USERNAME/dir1 CLITEST_DATA/file</command>
|
|
|
- <command>-cat CLITEST_DATA/file</command>
|
|
|
- </test-commands>
|
|
|
- <cleanup-commands>
|
|
|
- <command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
|
|
|
- <command>rm data</command>
|
|
|
- </cleanup-commands>
|
|
|
- <comparators>
|
|
|
- <comparator>
|
|
|
- <type>RegexpComparator</type>
|
|
|
- <expected-output>12345678901234.*</expected-output>
|
|
|
- </comparator>
|
|
|
- </comparators>
|
|
|
- </test>
|
|
|
-
|
|
|
<!-- Tests for snapshots -->
|
|
|
<test>
|
|
|
<description>allowSnapshot</description>
|