| <?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> |
| |
| <test> <!-- TESTEDtest-id=242 --> |
| <description>checksum: checksum of files(relative path) using globbing</description> |
| <test-commands> |
| <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/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^dir0/data120bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000a58cdc3c0967fc8cddb7fed5960d06f2</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^dir0/data15bytes\tMD5-of-0MD5-of-512CRC32C\t0000020000000000000000007267e9528002723a30939aefc238d665</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^dir0/data30bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000fc09371298117c4943cf089b4bd79c96</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^dir0/data60bytes\tMD5-of-0MD5-of-512CRC32C\t000002000000000000000000009476431d851dd7b0a8d057a404d7b9</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTEDtest-id=294 --> |
| <description>stat: statistics about directory(absolute path)</description> |
| <test-commands> |
| <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 TEST_DIR_ABSOLUTE/dirtest</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>dirtest-0-0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTEDtest-id=295 --> |
| <description>stat: statistics about directory(relative path)</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p dirtest</command> |
| <command>-fs NAMENODE -stat "%n-%b-%o" dirtest</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm -r /user/USER_NAME/dirtest</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>dirtest-0-0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTEDtest-id=296 --> |
| <description>stat: statistics about files (absolute path) 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 -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 -r TEST_DIR_ABSOLUTE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data15bytes-15"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data30bytes-30"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data60bytes-60"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data120bytes-120"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"datadir-0"</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTEDtest-id=297 --> |
| <description>stat: statistics about files (relative path) using globbing</description> |
| <test-commands> |
| <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 -r /user/USER_NAME/dir</command> |
| <command>-fs NAMENODE -rm -r /user/USER_NAME/dirtest</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data15bytes-15"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data30bytes-30"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data60bytes-60"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data120bytes-120"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"datadir-0"</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTEDtest-id=301 --> |
| <description>stat: Test for HCFS_SCHEME// path - statistics about directory</description> |
| <test-commands> |
| <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 -r HCFS_SCHEME//TEST_DIR_ABSOLUTE/dirtest</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>dirtest-0-0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTEDtest-id=302 --> |
| <description>stat: Test for HCFS_SCHEME// path - statistics about files using globbing</description> |
| <test-commands> |
| <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 -r HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data15bytes-15"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data30bytes-30"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data60bytes-60"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data120bytes-120"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"datadir-0"</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> <!-- TESTEDtest-id=305 --> |
| <description>stat: Test for Namenode's path - statistics about directory</description> |
| <test-commands> |
| <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> |
| <command>-fs NAMENODE -rm -r NAMENODETEST_DIR_ABSOLUTE/dirtest</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>dirtest-0-0</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <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 -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 NAMENODETEST_DIR_ABSOLUTE/dir0</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data15bytes-15"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data30bytes-30"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data60bytes-60"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"data120bytes-120"</expected-output> |
| </comparator> |
| <comparator> |
| <type>TokenComparator</type> |
| <expected-output>"datadir-0"</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>appendToFile</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USER_NAME/dir1</command> |
| <command>-fs NAMENODE -touchz /user/USER_NAME/dir1/file0</command> |
| <command>-fs NAMENODE -appendToFile CLITEST_DATA/data15bytes /user/USER_NAME/dir1/file0</command> |
| <command>-fs NAMENODE -cat /user/USER_NAME/dir1/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm -r /user/USER_NAME/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>12345678901234</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>text</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USER_NAME/dir1</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USER_NAME/dir1/file0</command> |
| <command>-fs NAMENODE -text /user/USER_NAME/dir1/file0</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm -r /user/USER_NAME/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>12345678901234</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>rmdir</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USER_NAME/dir1/dir2</command> |
| <command>-fs NAMENODE -rmdir /user/USER_NAME/dir1/dir2</command> |
| <command>-fs NAMENODE -ls /user/USER_NAME/dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm -r /user/USER_NAME/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>ExactComparator</type> |
| <expected-output></expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>rmdir with ignore-fail-on-non-empty</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USER_NAME/dir1/dir2</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USER_NAME/dir1/dir2/file0</command> |
| <command>-fs NAMENODE -rmdir --ignore-fail-on-non-empty /user/USER_NAME/dir1/dir2</command> |
| <command>-fs NAMENODE -ls /user/USER_NAME/dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm -r /user/USER_NAME/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Found 1 items</expected-output> |
| </comparator> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>^drwxr-xr-x( )*-( )*USER_NAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/USER_NAME/dir1/dir2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>df</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USER_NAME/dir1</command> |
| <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/USER_NAME/dir1/file0</command> |
| <command>-fs NAMENODE -df /user/USER_NAME</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm -r /user/USER_NAME/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Filesystem( )*Size( )*Used( )*Available( )*Use%.*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>expunge</description> |
| <test-commands> |
| <command>-fs NAMENODE -expunge</command> |
| </test-commands> |
| <cleanup-commands> |
| <command></command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>ExactComparator</type> |
| <expected-output></expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>getmerge</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USER_NAME/dir1</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USER_NAME/dir1</command> |
| <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USER_NAME/dir1</command> |
| <command>-fs NAMENODE -getmerge /user/USER_NAME/dir1 data</command> |
| <command>-fs NAMENODE -copyFromLocal data /user/USER_NAME/dir1</command> |
| <command>-fs NAMENODE -cat /user/USER_NAME/dir1/data</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm -r /user/USER_NAME/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>12345678901234.*</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| </tests> |
| </configuration> |