| <?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> |
| |
| <tests> |
| |
| <test> |
| <description>allowSnapshot</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command> |
| <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command> |
| <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Allowing snaphot on /user/USERNAME/dir1 succeeded</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>disallowSnapshot</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command> |
| <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Disallowing snaphot on /user/USERNAME/dir1 succeeded</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>createSnapshot</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command> |
| <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command> |
| <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot1</command> |
| <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command> |
| <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>Created snapshot /user/USERNAME/dir1/.snapshot/snapshot1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>renameSnapshot</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command> |
| <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command> |
| <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command> |
| <command>-fs NAMENODE -renameSnapshot /user/USERNAME/dir1 snapshot1 snapshot2</command> |
| <command>-fs NAMENODE -ls /user/USERNAME/dir1/.snapshot</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot2</command> |
| <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command> |
| <command>-fs NAMENODE -rm -r /user/USERNAME/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( )*-( )*USERNAME( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/USERNAME/dir1/.snapshot/snapshot2</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>deleteSnapshot</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command> |
| <dfs-admin-command>-fs NAMENODE -allowSnapshot /user/USERNAME/dir1</dfs-admin-command> |
| <command>-fs NAMENODE -createSnapshot /user/USERNAME/dir1 snapshot1</command> |
| <command>-fs NAMENODE -deleteSnapshot /user/USERNAME/dir1 snapshot1</command> |
| <command>-fs NAMENODE -ls /user/USERNAME/dir1/.snapshot</command> |
| </test-commands> |
| <cleanup-commands> |
| <dfs-admin-command>-fs NAMENODE -disallowSnapshot /user/USERNAME/dir1</dfs-admin-command> |
| <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>ExactComparator</type> |
| <expected-output></expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <!-- DFSadmin tests --> |
| <test> |
| <description>refreshUserToGroupsMappings</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -refreshUserToGroupsMappings</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <command></command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output></expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>refreshSuperUserGroupsConfiguration</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -refreshSuperUserGroupsConfiguration</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <command></command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output></expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>setQuota</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 3 /user/USERNAME/dir1</dfs-admin-command> |
| <command>-fs NAMENODE -count -q /user/USERNAME/dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( )*3.*/user/USERNAME/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>clrQuota</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command> |
| <dfs-admin-command>-fs NAMENODE -setQuota 3 /user/USERNAME/dir1</dfs-admin-command> |
| <dfs-admin-command>-fs NAMENODE -clrQuota /user/USERNAME/dir1</dfs-admin-command> |
| <command>-fs NAMENODE -count -q /user/USERNAME/dir1</command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>RegexpComparator</type> |
| <expected-output>( )*none.*/user/USERNAME/dir1</expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>setSpaceQuota</description> |
| <test-commands> |
| <command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command> |
| <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1G /user/USERNAME/dir1</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <command>-fs NAMENODE -rm -r /user/USERNAME/dir1</command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>ExactComparator</type> |
| <expected-output></expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>setBalancerBandwidth</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -setBalancerBandwidth 104857600</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <command></command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output></expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| <test> |
| <description>finalizeUpgrade</description> |
| <test-commands> |
| <dfs-admin-command>-fs NAMENODE -finalizeUpgrade</dfs-admin-command> |
| </test-commands> |
| <cleanup-commands> |
| <command></command> |
| </cleanup-commands> |
| <comparators> |
| <comparator> |
| <type>SubstringComparator</type> |
| <expected-output></expected-output> |
| </comparator> |
| </comparators> |
| </test> |
| |
| </tests> |
| |
| </configuration> |