2013-10-04 22:28:23 +00:00
|
|
|
<?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
|
|
|
|
-->
|
|
|
|
<tests>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing basic usage</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command></cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Usage: bin/hdfs cacheadmin [COMMAND]</expected-output>
|
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing listing no cache pools</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-listPools</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Found 0 results.</expected-output>
|
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing adding a cache pool</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool foo</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool foo</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Successfully added cache pool foo.</expected-output>
|
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing modifying a cache pool</description>
|
|
|
|
<test-commands>
|
2013-12-17 18:47:04 +00:00
|
|
|
<cache-admin-command>-addPool poolparty -owner alice -group alicegroup -mode 0000 -limit 50</cache-admin-command>
|
|
|
|
<cache-admin-command>-modifyPool poolparty -owner bob -group bobgroup -mode 0777 -limit 51</cache-admin-command>
|
2013-10-04 22:28:23 +00:00
|
|
|
<cache-admin-command>-listPools</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool poolparty</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-12-17 18:47:04 +00:00
|
|
|
<expected-output>poolparty bob bobgroup rwxrwxrwx 51</expected-output>
|
2013-10-04 22:28:23 +00:00
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing deleting a cache pool</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool foo</cache-admin-command>
|
|
|
|
<cache-admin-command>-removePool foo</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Successfully removed cache pool foo.</expected-output>
|
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing listing all cache pools</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool foo -owner bob -group bob -mode 0664</cache-admin-command>
|
|
|
|
<cache-admin-command>-addPool bar -owner alice -group alicegroup -mode 0755</cache-admin-command>
|
|
|
|
<cache-admin-command>-listPools</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool foo</cache-admin-command>
|
|
|
|
<cache-admin-command>-removePool bar</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Found 2 results.</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-12-17 18:47:04 +00:00
|
|
|
<expected-output>bar alice alicegroup rwxr-xr-x unlimited</expected-output>
|
2013-10-04 22:28:23 +00:00
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-12-17 18:47:04 +00:00
|
|
|
<expected-output>foo bob bob rw-rw-r-- unlimited</expected-output>
|
2013-10-04 22:28:23 +00:00
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing listing a single cache pool</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool foo -owner bob -group bob -mode 0664</cache-admin-command>
|
|
|
|
<cache-admin-command>-addPool bar -owner alice -group alicegroup -mode 0755</cache-admin-command>
|
|
|
|
<cache-admin-command>-listPools foo</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool foo</cache-admin-command>
|
|
|
|
<cache-admin-command>-removePool bar</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Found 1 result.</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-12-17 18:47:04 +00:00
|
|
|
<expected-output>foo bob bob rw-rw-r-- unlimited</expected-output>
|
2013-10-04 22:28:23 +00:00
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing creating cache paths</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool pool1</cache-admin-command>
|
2013-11-28 07:20:21 +00:00
|
|
|
<cache-admin-command>-addDirective -path /foo -pool pool1 -ttl 2d</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /bar -pool pool1 -ttl 24h</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /baz -replication 2 -pool pool1 -ttl 60m</cache-admin-command>
|
2013-10-06 17:06:03 +00:00
|
|
|
<cache-admin-command>-listDirectives -pool pool1</cache-admin-command>
|
2013-10-04 22:28:23 +00:00
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool pool1</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-10-16 20:23:14 +00:00
|
|
|
<expected-output>Found 3 entries</expected-output>
|
2013-10-04 22:28:23 +00:00
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-11-28 07:20:21 +00:00
|
|
|
<expected-output> 1 pool1 1</expected-output>
|
2013-10-04 22:28:23 +00:00
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-11-28 07:20:21 +00:00
|
|
|
<expected-output> 2 pool1 1</expected-output>
|
2013-10-04 22:28:23 +00:00
|
|
|
</comparator>
|
2013-10-16 20:23:14 +00:00
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-11-28 07:20:21 +00:00
|
|
|
<expected-output> 3 pool1 2 </expected-output>
|
2013-10-16 20:23:14 +00:00
|
|
|
</comparator>
|
2013-10-04 22:28:23 +00:00
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing removing cache paths</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool pool1</cache-admin-command>
|
2013-10-06 17:06:03 +00:00
|
|
|
<cache-admin-command>-addDirective -path /foo -pool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /bar -pool pool1</cache-admin-command>
|
2013-10-04 22:28:23 +00:00
|
|
|
<cache-admin-command>-removePool pool1</cache-admin-command>
|
2013-10-06 17:06:03 +00:00
|
|
|
<cache-admin-command>-listDirectives -pool pool1</cache-admin-command>
|
2013-10-04 22:28:23 +00:00
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Found 0 entries</expected-output>
|
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
2013-10-18 22:15:26 +00:00
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing listing directives filtered by pool</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addPool pool2</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /foo -pool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /bar -pool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /baz -pool pool2</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /buz -pool pool2</cache-admin-command>
|
|
|
|
<cache-admin-command>-listDirectives -pool pool2</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-removePool pool2</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Found 2 entries</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-11-28 07:20:21 +00:00
|
|
|
<expected-output> 8 pool2 1 never /baz </expected-output>
|
2013-10-18 22:15:26 +00:00
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-11-28 07:20:21 +00:00
|
|
|
<expected-output> 9 pool2 1 never /buz </expected-output>
|
2013-10-18 22:15:26 +00:00
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing listing directives filtered by path</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addPool pool2</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /foo -pool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /bar -pool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /foo -pool pool2</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /bar -pool pool2</cache-admin-command>
|
|
|
|
<cache-admin-command>-listDirectives -path /foo</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-removePool pool2</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Found 2 entries</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-11-28 07:20:21 +00:00
|
|
|
<expected-output> 10 pool1 1 never /foo </expected-output>
|
2013-10-18 22:15:26 +00:00
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-11-28 07:20:21 +00:00
|
|
|
<expected-output> 12 pool2 1 never /foo </expected-output>
|
2013-10-18 22:15:26 +00:00
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing listing directives filtered by path and pool</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addPool pool2</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /foo -pool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /bar -pool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /foo -pool pool2</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /bar -pool pool2</cache-admin-command>
|
|
|
|
<cache-admin-command>-listDirectives -path /foo -pool pool2</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-removePool pool2</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Found 1 entry</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-11-28 07:20:21 +00:00
|
|
|
<expected-output> 16 pool2 1 never /foo </expected-output>
|
2013-10-18 22:15:26 +00:00
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing removing a directive</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /foo -pool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /bar -pool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-removeDirective 18</cache-admin-command>
|
|
|
|
<cache-admin-command>-listDirectives</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool pool1</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Found 1 entry</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-11-28 07:20:21 +00:00
|
|
|
<expected-output> 19 pool1 1 never /bar </expected-output>
|
2013-10-18 22:15:26 +00:00
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing removing every directive for a path</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addPool pool2</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /foo -pool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /foo -pool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /bar -pool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /foo -pool pool2</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /bar -pool pool2</cache-admin-command>
|
2013-11-09 05:54:19 +00:00
|
|
|
<cache-admin-command>-removeDirectives -path ../../foo</cache-admin-command>
|
2013-10-18 22:15:26 +00:00
|
|
|
<cache-admin-command>-listDirectives</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-removePool pool2</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Found 2 entries</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-11-28 07:20:21 +00:00
|
|
|
<expected-output> 22 pool1 1 never /bar </expected-output>
|
2013-10-18 22:15:26 +00:00
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-11-28 07:20:21 +00:00
|
|
|
<expected-output> 24 pool2 1 never /bar </expected-output>
|
2013-11-13 03:29:02 +00:00
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing modifying directives</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addPool pool2</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /foo -pool pool2</cache-admin-command>
|
|
|
|
<cache-admin-command>-modifyDirective -id 25 -path /bar2</cache-admin-command>
|
|
|
|
<cache-admin-command>-modifyDirective -id 25 -pool pool1 -path /bar3</cache-admin-command>
|
|
|
|
<cache-admin-command>-listDirectives -path /bar3</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-removePool pool2</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Found 1 entry</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-11-28 07:20:21 +00:00
|
|
|
<expected-output> 25 pool1 1 never /bar3 </expected-output>
|
2013-10-18 22:15:26 +00:00
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
2013-11-07 19:58:52 +00:00
|
|
|
<test>
|
|
|
|
<description>Testing the help usage</description>
|
|
|
|
<test-commands>
|
2013-11-26 21:38:46 +00:00
|
|
|
<cache-admin-command>-help addPool</cache-admin-command>
|
2013-11-07 19:58:52 +00:00
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Add a new cache pool.</expected-output>
|
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
2013-12-05 21:09:30 +00:00
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing listing cache pool statistics</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool foo -owner bob -group bob -mode 0664</cache-admin-command>
|
|
|
|
<cache-admin-command>-addPool bar -owner alice -group alicegroup -mode 0755</cache-admin-command>
|
|
|
|
<cache-admin-command>-listPools -stats</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool foo</cache-admin-command>
|
|
|
|
<cache-admin-command>-removePool bar</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Found 2 results.</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-12-20 23:27:20 +00:00
|
|
|
<expected-output>bar alice alicegroup rwxr-xr-x unlimited never 0 0 0 0 0</expected-output>
|
2013-12-05 21:09:30 +00:00
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
2013-12-20 23:27:20 +00:00
|
|
|
<expected-output>foo bob bob rw-rw-r-- unlimited never 0 0 0 0 0</expected-output>
|
2013-12-05 21:09:30 +00:00
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing listing cache directive statistics</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool pool1</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /foo -pool pool1 -ttl 2d</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /bar -pool pool1 -ttl 24h</cache-admin-command>
|
|
|
|
<cache-admin-command>-addDirective -path /baz -replication 2 -pool pool1 -ttl 60m</cache-admin-command>
|
|
|
|
<cache-admin-command>-listDirectives -pool pool1 -stats</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool pool1</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Found 3 entries</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>/foo 0 0 0 0</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>/bar 0 0 0 0</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>/baz 0 0 0 0</expected-output>
|
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
2013-12-20 23:27:20 +00:00
|
|
|
|
|
|
|
<test> <!--Tested -->
|
|
|
|
<description>Testing pool max ttl settings</description>
|
|
|
|
<test-commands>
|
|
|
|
<cache-admin-command>-addPool pool1 -owner andrew -group andrew</cache-admin-command>
|
|
|
|
<cache-admin-command>-addPool pool2 -owner andrew -group andrew -maxTtl 999d</cache-admin-command>
|
|
|
|
<cache-admin-command>-modifyPool pool2 -maxTtl never</cache-admin-command>
|
|
|
|
<cache-admin-command>-addPool pool3 -owner andrew -group andrew -maxTtl 4h</cache-admin-command>
|
|
|
|
<cache-admin-command>-listPools</cache-admin-command>
|
|
|
|
</test-commands>
|
|
|
|
<cleanup-commands>
|
|
|
|
<cache-admin-command>-removePool pool1</cache-admin-command>
|
|
|
|
</cleanup-commands>
|
|
|
|
<comparators>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>Found 3 results</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>pool1 andrew andrew rwxr-xr-x unlimited never</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>pool2 andrew andrew rwxr-xr-x unlimited never</expected-output>
|
|
|
|
</comparator>
|
|
|
|
<comparator>
|
|
|
|
<type>SubstringComparator</type>
|
|
|
|
<expected-output>pool3 andrew andrew rwxr-xr-x unlimited 000:04:00:00.000</expected-output>
|
|
|
|
</comparator>
|
|
|
|
</comparators>
|
|
|
|
</test>
|
2013-10-04 22:28:23 +00:00
|
|
|
</tests>
|
|
|
|
</configuration>
|