source: proiecte/HadoopJUnit/hadoop-0.20.1/src/test/org/apache/hadoop/cli/testConf.xml @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 134.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet type="text/xsl" href="testConf.xsl"?>
3
4<configuration>
5  <!-- Normal mode is test. To run just the commands and dump the output
6       to the log, set it to nocompare -->
7  <mode>test</mode>
8 
9  <!--  Comparator types:
10           ExactComparator
11           SubstringComparator
12           RegexpComparator
13           TokenComparator
14           -->
15  <tests>
16    <!-- Tests for ls -->
17    <test> <!-- TESTED -->
18      <description>ls: file using absolute path</description>
19      <test-commands>
20        <command>-fs NAMENODE -touchz /file1</command>
21        <command>-fs NAMENODE -ls /file1</command>
22      </test-commands>
23      <cleanup-commands>
24        <command>-fs NAMENODE -rm /file1</command>
25      </cleanup-commands>
26      <comparators>
27        <comparator>
28          <type>TokenComparator</type>
29          <expected-output>Found 1 items</expected-output>
30        </comparator>
31        <comparator>
32          <type>RegexpComparator</type>
33          <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>
34        </comparator>
35      </comparators>
36    </test>
37   
38    <test> <!-- TESTED -->
39      <description>ls: file using relative path</description>
40      <test-commands>
41        <command>-fs NAMENODE -touchz file1</command>
42        <command>-fs NAMENODE -ls file1</command>
43      </test-commands>
44      <cleanup-commands>
45        <command>-fs NAMENODE -rm file1</command>
46      </cleanup-commands>
47      <comparators>
48        <comparator>
49          <type>TokenComparator</type>
50          <expected-output>Found 1 items</expected-output>
51        </comparator>
52        <comparator>
53          <type>RegexpComparator</type>
54          <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,}( )*/user/[a-z]*/file1</expected-output>
55        </comparator>
56      </comparators>
57    </test>
58   
59    <test> <!-- TESTED -->
60      <description>ls: files using globbing</description>
61      <test-commands>
62        <command>-fs NAMENODE -touchz file1</command>
63        <command>-fs NAMENODE -touchz file2</command>
64        <command>-fs NAMENODE -touchz file3</command>
65        <command>-fs NAMENODE -touchz file4</command>
66        <command>-fs NAMENODE -ls file*</command>
67      </test-commands>
68      <cleanup-commands>
69        <command>-fs NAMENODE -rmr /user</command>
70      </cleanup-commands>
71      <comparators>
72        <comparator>
73          <type>RegexpComparator</type>
74          <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,}( )*/user/[a-z]*/file1</expected-output>
75        </comparator>
76        <comparator>
77          <type>RegexpComparator</type>
78          <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,}( )*/user/[a-z]*/file2</expected-output>
79        </comparator>
80        <comparator>
81          <type>RegexpComparator</type>
82          <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,}( )*/user/[a-z]*/file3</expected-output>
83        </comparator>
84        <comparator>
85          <type>RegexpComparator</type>
86          <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,}( )*/user/[a-z]*/file4</expected-output>
87        </comparator>
88      </comparators>
89    </test>
90   
91    <test> <!-- TESTED -->
92      <description>ls: directory using absolute path</description>
93      <test-commands>
94        <command>-fs NAMENODE -mkdir /dir1</command>
95        <command>-fs NAMENODE -ls /</command>
96      </test-commands>
97      <cleanup-commands>
98        <command>-fs NAMENODE -rmr /dir1</command>
99      </cleanup-commands>
100      <comparators>
101        <comparator>
102          <type>TokenComparator</type>
103          <expected-output>Found 1 items</expected-output>
104        </comparator>
105        <comparator>
106          <type>RegexpComparator</type>
107          <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>
108        </comparator>
109      </comparators>
110    </test>
111   
112    <test> <!-- TESTED -->
113      <description>ls: directory using relative path</description>
114      <test-commands>
115        <command>-fs NAMENODE -mkdir dir1</command>
116        <command>-fs NAMENODE -ls </command>
117      </test-commands>
118      <cleanup-commands>
119        <command>-fs NAMENODE -rmr dir1</command>
120      </cleanup-commands>
121      <comparators>
122        <comparator>
123          <type>TokenComparator</type>
124          <expected-output>Found 1 items</expected-output>
125        </comparator>
126        <comparator>
127          <type>RegexpComparator</type>
128          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir1</expected-output>
129        </comparator>
130      </comparators>
131    </test>
132   
133    <test> <!-- TESTED -->
134      <description>ls: directory using globbing</description>
135      <test-commands>
136        <command>-fs NAMENODE -mkdir dir1</command>
137        <command>-fs NAMENODE -mkdir dir2</command>
138        <command>-fs NAMENODE -mkdir dir3</command>
139        <command>-fs NAMENODE -mkdir dir4</command>
140        <command>-fs NAMENODE -ls </command>
141      </test-commands>
142      <cleanup-commands>
143        <command>-fs NAMENODE -rmr /user</command>
144      </cleanup-commands>
145      <comparators>
146        <comparator>
147          <type>RegexpComparator</type>
148          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir1</expected-output>
149        </comparator>
150        <comparator>
151          <type>RegexpComparator</type>
152          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir2</expected-output>
153        </comparator>
154        <comparator>
155          <type>RegexpComparator</type>
156          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir3</expected-output>
157        </comparator>
158        <comparator>
159          <type>RegexpComparator</type>
160          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir4</expected-output>
161        </comparator>
162      </comparators>
163    </test>
164   
165    <test> <!-- TESTED -->
166      <description>ls: file/directory that does not exist in /</description>
167      <test-commands>
168        <command>-fs NAMENODE -ls /file1</command>
169      </test-commands>
170      <cleanup-commands>
171      </cleanup-commands>
172      <comparators>
173        <comparator>
174          <type>RegexpComparator</type>
175          <expected-output>^ls: Cannot access /file1: No such file or directory.</expected-output>
176        </comparator>
177      </comparators>
178    </test>
179   
180    <test> <!-- TESTED -->
181      <description>ls: file/directory that does not exist in home directory (/user/username)</description>
182      <test-commands>
183        <command>-fs NAMENODE -ls /user</command>
184      </test-commands>
185      <cleanup-commands>
186      </cleanup-commands>
187      <comparators>
188        <comparator>
189          <type>RegexpComparator</type>
190          <expected-output>^ls: Cannot access /user: No such file or directory.</expected-output>
191        </comparator>
192      </comparators>
193    </test>
194   
195    <!-- Tests for lsr -->
196    <test> <!-- TESTED -->
197      <description>lsr: files/directories using absolute path</description>
198      <test-commands>
199        <command>-fs NAMENODE -mkdir /dir0</command>
200        <command>-fs NAMENODE -mkdir /dir0/dir1</command>
201        <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
202        <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
203        <command>-fs NAMENODE -mkdir /dir0/dir2</command>
204        <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
205        <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
206        <command>-fs NAMENODE -touchz /dir0/file0</command>
207        <command>-fs NAMENODE -touchz /dir0/dir1/file1</command>
208        <command>-fs NAMENODE -touchz /dir0/dir1/file2</command>
209        <command>-fs NAMENODE -touchz /dir0/dir2/file1</command>
210        <command>-fs NAMENODE -touchz /dir0/dir2/file2</command>
211        <command>-fs NAMENODE -touchz /dir0/dir1/dir1/file1</command>
212        <command>-fs NAMENODE -touchz /dir0/dir1/dir1/file2</command>
213        <command>-fs NAMENODE -touchz /dir0/dir2/dir2/file1</command>
214        <command>-fs NAMENODE -touchz /dir0/dir2/dir2/file2</command>
215        <command>-fs NAMENODE -lsr /dir0</command>
216      </test-commands>
217      <cleanup-commands>
218        <command>-fs NAMENODE -rmr /dir0</command>
219      </cleanup-commands>
220      <comparators>
221        <comparator>
222          <type>RegexpComparator</type>
223          <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>
224        </comparator>
225        <comparator>
226          <type>RegexpComparator</type>
227          <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>
228        </comparator>
229        <comparator>
230          <type>RegexpComparator</type>
231          <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>
232        </comparator>
233        <comparator>
234          <type>RegexpComparator</type>
235          <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>
236        </comparator>
237        <comparator>
238          <type>RegexpComparator</type>
239          <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>
240        </comparator>
241        <comparator>
242          <type>RegexpComparator</type>
243          <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>
244        </comparator>
245        <comparator>
246          <type>RegexpComparator</type>
247          <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>
248        </comparator>
249        <comparator>
250          <type>RegexpComparator</type>
251          <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>
252        </comparator>
253        <comparator>
254          <type>RegexpComparator</type>
255          <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>
256        </comparator>
257        <comparator>
258          <type>RegexpComparator</type>
259          <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>
260        </comparator>
261        <comparator>
262          <type>RegexpComparator</type>
263          <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>
264        </comparator>
265        <comparator>
266          <type>RegexpComparator</type>
267          <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>
268        </comparator>
269        <comparator>
270          <type>RegexpComparator</type>
271          <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>
272        </comparator>
273        <comparator>
274          <type>RegexpComparator</type>
275          <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>
276        </comparator>
277        <comparator>
278          <type>RegexpComparator</type>
279          <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>
280        </comparator>
281      </comparators>
282    </test>
283   
284    <test> <!-- TESTED -->
285      <description>lsr: files/directories using relative path</description>
286      <test-commands>
287        <command>-fs NAMENODE -mkdir dir0</command>
288        <command>-fs NAMENODE -mkdir dir0/dir1</command>
289        <command>-fs NAMENODE -mkdir dir0/dir1/dir1</command>
290        <command>-fs NAMENODE -mkdir dir0/dir1/dir2</command>
291        <command>-fs NAMENODE -mkdir dir0/dir2</command>
292        <command>-fs NAMENODE -mkdir dir0/dir2/dir1</command>
293        <command>-fs NAMENODE -mkdir dir0/dir2/dir2</command>
294        <command>-fs NAMENODE -touchz dir0/file0</command>
295        <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
296        <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
297        <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
298        <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
299        <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
300        <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
301        <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
302        <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
303        <command>-fs NAMENODE -lsr dir0</command>
304      </test-commands>
305      <cleanup-commands>
306        <command>-fs NAMENODE -rmr /user</command>
307      </cleanup-commands>
308      <comparators>
309        <comparator>
310          <type>RegexpComparator</type>
311          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1</expected-output>
312        </comparator>
313        <comparator>
314          <type>RegexpComparator</type>
315          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2</expected-output>
316        </comparator>
317        <comparator>
318          <type>RegexpComparator</type>
319          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1</expected-output>
320        </comparator>
321        <comparator>
322          <type>RegexpComparator</type>
323          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir2</expected-output>
324        </comparator>
325        <comparator>
326          <type>RegexpComparator</type>
327          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir1</expected-output>
328        </comparator>
329        <comparator>
330          <type>RegexpComparator</type>
331          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2</expected-output>
332        </comparator>
333        <comparator>
334          <type>RegexpComparator</type>
335          <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,}( )*/user/[a-z]*/dir0/file0</expected-output>
336        </comparator>
337        <comparator>
338          <type>RegexpComparator</type>
339          <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,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output>
340        </comparator>
341        <comparator>
342          <type>RegexpComparator</type>
343          <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,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output>
344        </comparator>
345        <comparator>
346          <type>RegexpComparator</type>
347          <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,}( )*/user/[a-z]*/dir0/dir2/file1</expected-output>
348        </comparator>
349        <comparator>
350          <type>RegexpComparator</type>
351          <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,}( )*/user/[a-z]*/dir0/dir2/file2</expected-output>
352        </comparator>
353        <comparator>
354          <type>RegexpComparator</type>
355          <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,}( )*/user/[a-z]*/dir0/dir1/dir1/file1</expected-output>
356        </comparator>
357        <comparator>
358          <type>RegexpComparator</type>
359          <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,}( )*/user/[a-z]*/dir0/dir1/dir1/file2</expected-output>
360        </comparator>
361        <comparator>
362          <type>RegexpComparator</type>
363          <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,}( )*/user/[a-z]*/dir0/dir2/dir2/file1</expected-output>
364        </comparator>
365        <comparator>
366          <type>RegexpComparator</type>
367          <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,}( )*/user/[a-z]*/dir0/dir2/dir2/file2</expected-output>
368        </comparator>
369      </comparators>
370    </test>
371   
372    <test> <!-- TESTED -->
373      <description>lsr: files/directories using globbing</description>
374      <test-commands>
375        <command>-fs NAMENODE -mkdir dir0</command>
376        <command>-fs NAMENODE -mkdir dir0/dir1</command>
377        <command>-fs NAMENODE -mkdir dir0/dir1/dir1</command>
378        <command>-fs NAMENODE -mkdir dir0/dir1/dir2</command>
379        <command>-fs NAMENODE -mkdir dir0/dir2</command>
380        <command>-fs NAMENODE -mkdir dir0/dir2/dir1</command>
381        <command>-fs NAMENODE -mkdir dir0/dir2/dir2</command>
382        <command>-fs NAMENODE -touchz dir0/file0</command>
383        <command>-fs NAMENODE -touchz dir0/dir1/file1</command>
384        <command>-fs NAMENODE -touchz dir0/dir1/file2</command>
385        <command>-fs NAMENODE -touchz dir0/dir2/file1</command>
386        <command>-fs NAMENODE -touchz dir0/dir2/file2</command>
387        <command>-fs NAMENODE -touchz dir0/dir1/dir1/file1</command>
388        <command>-fs NAMENODE -touchz dir0/dir1/dir1/file2</command>
389        <command>-fs NAMENODE -touchz dir0/dir2/dir2/file1</command>
390        <command>-fs NAMENODE -touchz dir0/dir2/dir2/file2</command>
391        <command>-fs NAMENODE -lsr dir0/*</command>
392      </test-commands>
393      <cleanup-commands>
394        <command>-fs NAMENODE -rmr /user</command>
395      </cleanup-commands>
396      <comparators>
397        <!-- JIRA?
398        <comparator>
399          <type>RegexpComparator</type>
400          <expected-output>^/user/[a-z]*/dir0/dir1</expected-output>
401        </comparator>
402        <comparator>
403          <type>RegexpComparator</type>
404          <expected-output>^/user/[a-z]*/dir0/dir2</expected-output>
405        </comparator>
406       -->
407        <comparator>
408          <type>RegexpComparator</type>
409          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir1</expected-output>
410        </comparator>
411        <comparator>
412          <type>RegexpComparator</type>
413          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir1/dir2</expected-output>
414        </comparator>
415        <comparator>
416          <type>RegexpComparator</type>
417          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir1</expected-output>
418        </comparator>
419        <comparator>
420          <type>RegexpComparator</type>
421          <expected-output>^drwxr-xr-x( )*-( )*[a-z]*( )*supergroup( )*0( )*[0-9]{4,}-[0-9]{2,}-[0-9]{2,} [0-9]{2,}:[0-9]{2,}( )*/user/[a-z]*/dir0/dir2/dir2</expected-output>
422        </comparator>
423        <comparator>
424          <type>RegexpComparator</type>
425          <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,}( )*/user/[a-z]*/dir0/file0</expected-output>
426        </comparator>
427        <comparator>
428          <type>RegexpComparator</type>
429          <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,}( )*/user/[a-z]*/dir0/dir1/file1</expected-output>
430        </comparator>
431        <comparator>
432          <type>RegexpComparator</type>
433          <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,}( )*/user/[a-z]*/dir0/dir1/file2</expected-output>
434        </comparator>
435        <comparator>
436          <type>RegexpComparator</type>
437          <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,}( )*/user/[a-z]*/dir0/dir2/file1</expected-output>
438        </comparator>
439        <comparator>
440          <type>RegexpComparator</type>
441          <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,}( )*/user/[a-z]*/dir0/dir2/file2</expected-output>
442        </comparator>
443        <comparator>
444          <type>RegexpComparator</type>
445          <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,}( )*/user/[a-z]*/dir0/dir1/dir1/file1</expected-output>
446        </comparator>
447        <comparator>
448          <type>RegexpComparator</type>
449          <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,}( )*/user/[a-z]*/dir0/dir1/dir1/file2</expected-output>
450        </comparator>
451        <comparator>
452          <type>RegexpComparator</type>
453          <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,}( )*/user/[a-z]*/dir0/dir2/dir2/file1</expected-output>
454        </comparator>
455        <comparator>
456          <type>RegexpComparator</type>
457          <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,}( )*/user/[a-z]*/dir0/dir2/dir2/file2</expected-output>
458        </comparator>
459      </comparators>
460    </test>
461   
462    <test> <!-- TESTED -->
463      <description>lsr: file/directory that does not exist in /</description>
464      <test-commands>
465        <command>-fs NAMENODE -lsr /file1</command>
466      </test-commands>
467      <cleanup-commands>
468      </cleanup-commands>
469      <comparators>
470        <comparator>
471          <type>RegexpComparator</type>
472          <expected-output>^lsr: Cannot access /file1: No such file or directory.</expected-output>
473        </comparator>
474      </comparators>
475    </test>
476   
477    <test> <!-- TESTED -->
478      <description>lsr: file/directory that does not exist in home directory (/user/username)</description>
479      <test-commands>
480        <command>-fs NAMENODE -lsr /user</command>
481      </test-commands>
482      <cleanup-commands>
483      </cleanup-commands>
484      <comparators>
485        <comparator>
486          <type>RegexpComparator</type>
487          <expected-output>^lsr: Cannot access /user: No such file or directory.</expected-output>
488        </comparator>
489      </comparators>
490    </test>
491   
492    <!-- Tests for du -->
493    <test> <!-- TESTED -->
494      <description>du: file using absolute path</description>
495      <test-commands>
496        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
497        <command>-fs NAMENODE -du /data15bytes</command>
498      </test-commands>
499      <cleanup-commands>
500        <command>-fs NAMENODE -rm /data15bytes</command>
501      </cleanup-commands>
502      <comparators>
503        <comparator>
504          <type>TokenComparator</type>
505          <expected-output>Found 1 items</expected-output>
506        </comparator>
507        <comparator>
508          <type>RegexpComparator</type>
509          <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/data15bytes</expected-output>
510        </comparator>
511      </comparators>
512    </test>
513   
514    <test> <!-- TESTED -->
515      <description>du: file using relative path</description>
516      <test-commands>
517        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
518        <command>-fs NAMENODE -du data15bytes</command>
519      </test-commands>
520      <cleanup-commands>
521        <command>-fs NAMENODE -rmr /user</command>
522      </cleanup-commands>
523      <comparators>
524        <comparator>
525          <type>TokenComparator</type>
526          <expected-output>Found 1 items</expected-output>
527        </comparator>
528        <comparator>
529          <type>RegexpComparator</type>
530          <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/data15bytes</expected-output>
531        </comparator>
532      </comparators>
533    </test>
534   
535    <test> <!-- TESTED -->
536      <description>du: files using globbing</description>
537      <test-commands>
538        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
539        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
540        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
541        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
542        <command>-fs NAMENODE -du data*</command>
543      </test-commands>
544      <cleanup-commands>
545        <command>-fs NAMENODE -rmr /user</command>
546      </cleanup-commands>
547      <comparators>
548        <comparator>
549          <type>TokenComparator</type>
550          <expected-output>Found 4 items</expected-output>
551        </comparator>
552        <comparator>
553          <type>RegexpComparator</type>
554          <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/data15bytes</expected-output>
555        </comparator>
556        <comparator>
557          <type>RegexpComparator</type>
558          <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/data30bytes</expected-output>
559        </comparator>
560        <comparator>
561          <type>RegexpComparator</type>
562          <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/data60bytes</expected-output>
563        </comparator>
564        <comparator>
565          <type>RegexpComparator</type>
566          <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/data120bytes</expected-output>
567        </comparator>
568      </comparators>
569    </test>
570   
571    <test> <!-- TESTED -->
572      <description>du: directory using absolute path</description>
573      <test-commands>
574        <command>-fs NAMENODE -mkdir /dir0</command>
575        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
576        <command>-fs NAMENODE -du /dir0</command>
577      </test-commands>
578      <cleanup-commands>
579        <command>-fs NAMENODE -rmr /dir0</command>
580      </cleanup-commands>
581      <comparators>
582        <comparator>
583          <type>TokenComparator</type>
584          <expected-output>Found 1 items</expected-output>
585        </comparator>
586        <comparator>
587          <type>RegexpComparator</type>
588          <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output>
589        </comparator>
590      </comparators>
591    </test>
592   
593    <test> <!-- TESTED -->
594      <description>du: directory using relative path</description>
595      <test-commands>
596        <command>-fs NAMENODE -mkdir dir0</command>
597        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
598        <command>-fs NAMENODE -du dir0</command>
599      </test-commands>
600      <cleanup-commands>
601        <command>-fs NAMENODE -rmr /user</command>
602      </cleanup-commands>
603      <comparators>
604        <comparator>
605          <type>TokenComparator</type>
606          <expected-output>Found 1 items</expected-output>
607        </comparator>
608        <comparator>
609          <type>RegexpComparator</type>
610          <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/data15bytes</expected-output>
611        </comparator>
612      </comparators>
613    </test>
614   
615    <test> <!-- TESTED -->
616      <description>du: directory using globbing</description>
617      <test-commands>
618        <command>-fs NAMENODE -mkdir /dir0</command>
619        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
620        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
621        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
622        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
623        <command>-fs NAMENODE -du /dir0/*</command>
624      </test-commands>
625      <cleanup-commands>
626        <command>-fs NAMENODE -rmr /dir0</command>
627      </cleanup-commands>
628      <comparators>
629        <comparator>
630          <type>TokenComparator</type>
631          <expected-output>Found 4 items</expected-output>
632        </comparator>
633        <comparator>
634          <type>RegexpComparator</type>
635          <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output>
636        </comparator>
637        <comparator>
638          <type>RegexpComparator</type>
639          <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data30bytes</expected-output>
640        </comparator>
641        <comparator>
642          <type>RegexpComparator</type>
643          <expected-output>^60( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data60bytes</expected-output>
644        </comparator>
645        <comparator>
646          <type>RegexpComparator</type>
647          <expected-output>^120( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data120bytes</expected-output>
648        </comparator>
649      </comparators>
650    </test>
651   
652    <!-- Tests for dus -->
653    <test> <!-- TESTED -->
654      <description>dus: directories/files using absolute path</description>
655      <test-commands>
656        <command>-fs NAMENODE -mkdir /dir0</command>
657        <command>-fs NAMENODE -mkdir /dir0/dir1</command>
658        <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
659        <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
660        <command>-fs NAMENODE -mkdir /dir0/dir2</command>
661        <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
662        <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
663        <command>-fs NAMENODE -touchz /dir0/file0</command>
664        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data15bytes</command>
665        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir1/data30bytes</command>
666        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir2/data15bytes</command>
667        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir2/data30bytes</command>
668        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir1/dir1/data60bytes</command>
669        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir1/dir2/data120bytes</command>
670        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir2/dir1/data60bytes</command>
671        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir2/dir2/data120bytes</command>
672        <command>-fs NAMENODE -dus /dir0</command>
673      </test-commands>
674      <cleanup-commands>
675        <command>-fs NAMENODE -rmr /dir0</command>
676      </cleanup-commands>
677      <comparators>
678        <comparator>
679          <type>RegexpComparator</type>
680          <expected-output>^hdfs://localhost[.a-z]*:[0-9]*/dir0( |\t)*450</expected-output>
681        </comparator>
682      </comparators>
683    </test>
684   
685    <test> <!-- TESTED -->
686      <description>dus: directories/files using relative path</description>
687      <test-commands>
688        <command>-fs NAMENODE -mkdir dir0</command>
689        <command>-fs NAMENODE -mkdir dir0/dir1</command>
690        <command>-fs NAMENODE -mkdir dir0/dir1/dir1</command>
691        <command>-fs NAMENODE -mkdir dir0/dir1/dir2</command>
692        <command>-fs NAMENODE -mkdir dir0/dir2</command>
693        <command>-fs NAMENODE -mkdir dir0/dir2/dir1</command>
694        <command>-fs NAMENODE -mkdir dir0/dir2/dir2</command>
695        <command>-fs NAMENODE -touchz dir0/file0</command>
696        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir1/data15bytes</command>
697        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir1/data30bytes</command>
698        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/dir2/data15bytes</command>
699        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/dir2/data30bytes</command>
700        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir1/dir1/data60bytes</command>
701        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir1/dir2/data120bytes</command>
702        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/dir2/dir1/data60bytes</command>
703        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/dir2/dir2/data120bytes</command>
704        <command>-fs NAMENODE -dus dir0</command>
705      </test-commands>
706      <cleanup-commands>
707        <command>-fs NAMENODE -rmr /user</command>
708      </cleanup-commands>
709      <comparators>
710        <comparator>
711          <type>RegexpComparator</type>
712          <expected-output>^hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0( |\t)*450</expected-output>
713        </comparator>
714      </comparators>
715    </test>
716   
717    <test> <!-- TESTED -->
718      <description>dus: directories/files using globbing</description>
719      <test-commands>
720        <command>-fs NAMENODE -mkdir /dir0</command>
721        <command>-fs NAMENODE -mkdir /dir0/dir1</command>
722        <command>-fs NAMENODE -mkdir /dir0/dir1/dir1</command>
723        <command>-fs NAMENODE -mkdir /dir0/dir1/dir2</command>
724        <command>-fs NAMENODE -mkdir /dir0/dir2</command>
725        <command>-fs NAMENODE -mkdir /dir0/dir2/dir1</command>
726        <command>-fs NAMENODE -mkdir /dir0/dir2/dir2</command>
727        <command>-fs NAMENODE -touchz /dir0/file0</command>
728        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir1/data15bytes</command>
729        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir1/data30bytes</command>
730        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/dir2/data15bytes</command>
731        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/dir2/data30bytes</command>
732        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir1/dir1/data60bytes</command>
733        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir1/dir2/data120bytes</command>
734        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/dir2/dir1/data60bytes</command>
735        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/dir2/dir2/data120bytes</command>
736        <command>-fs NAMENODE -mkdir /donotcountdir0</command>
737        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
738        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
739        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
740        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /donotcountdir0/data15bytes</command>
741        <command>-fs NAMENODE -dus /dir*</command>
742      </test-commands>
743      <cleanup-commands>
744        <command>-fs NAMENODE -rmr /dir0</command>
745        <command>-fs NAMENODE -rmr /donotcountdir0</command>
746      </cleanup-commands>
747      <comparators>
748        <comparator>
749          <type>RegexpComparator</type>
750          <expected-output>^hdfs://localhost[.a-z]*:[0-9]*/dir0( |\t)*450</expected-output>
751        </comparator>
752      </comparators>
753    </test>
754   
755    <!-- Tests for mv -->
756    <test> <!-- TESTED -->
757      <description>mv: file (absolute path) to file (absolute path)</description>
758      <test-commands>
759        <command>-fs NAMENODE -touchz /file1</command>
760        <command>-fs NAMENODE -mv /file1 /file2</command>
761        <command>-fs NAMENODE -ls /file*</command>       
762      </test-commands>
763      <cleanup-commands>
764        <command>-fs NAMENODE -rm /file2</command>
765      </cleanup-commands>:
766      <comparators>
767        <comparator>
768          <type>TokenComparator</type>
769          <expected-output>Found 1 items</expected-output>
770        </comparator>
771        <comparator>
772          <type>RegexpComparator</type>
773          <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>
774        </comparator>
775        <comparator>
776          <type>RegexpComparator</type>
777          <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,}( )*/file[^1]</expected-output>
778        </comparator>
779      </comparators>
780    </test>
781   
782    <test> <!-- TESTED -->
783      <description>mv: file (absolute path) to file (relative path)</description>
784      <test-commands>
785        <command>-fs NAMENODE -touchz /file1</command>
786        <command>-fs NAMENODE -mv /file1 file2</command>
787      </test-commands>
788      <cleanup-commands>
789        <command>-fs NAMENODE -rmr /file1</command>
790      </cleanup-commands>
791      <comparators>
792        <comparator>
793          <type>RegexpComparator</type>
794          <expected-output>^mv: Failed to rename hdfs://localhost[.a-z]*:[0-9]*/file1 to file2</expected-output>
795        </comparator>
796      </comparators>
797    </test>
798   
799    <test> <!-- TESTED -->
800      <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination</description>
801      <test-commands>
802        <command>-fs NAMENODE -touchz /file1</command>
803        <command>-fs NAMENODE -mkdir /dir0</command>
804        <command>-fs NAMENODE -mv /file1 /dir0</command>
805        <command>-fs NAMENODE -lsr /dir0</command>       
806      </test-commands>
807      <cleanup-commands>
808        <command>-fs NAMENODE -rmr /dir0</command>
809      </cleanup-commands>
810      <comparators>
811        <comparator>
812          <type>RegexpComparator</type>
813          <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/file1</expected-output>
814        </comparator>
815      </comparators>
816    </test>
817   
818    <test> <!-- TESTED -->
819      <description>mv: file (absolute path) to directory (absolute path); keep the same name at the destination [ TIED to previous test ]</description>
820      <test-commands>
821        <command>-fs NAMENODE -ls /file1</command>       
822      </test-commands>
823      <cleanup-commands>
824      </cleanup-commands>
825      <comparators>
826        <comparator>
827          <type>TokenComparator</type>
828          <expected-output>ls: Cannot access /file1: No such file or directory.</expected-output>
829        </comparator>
830      </comparators>
831    </test>
832   
833    <test> <!-- TESTED -->
834      <description>mv: file (absolute path) to directory (absolute path); change the name at the destination</description>
835      <test-commands>
836        <command>-fs NAMENODE -touchz /file1</command>
837        <command>-fs NAMENODE -mkdir /dir0</command>
838        <command>-fs NAMENODE -mv /file1 /dir0/file2</command>
839        <command>-fs NAMENODE -ls /dir0</command>       
840      </test-commands>
841      <cleanup-commands>
842        <command>-fs NAMENODE -rmr /dir0</command>
843      </cleanup-commands>
844      <comparators>
845        <comparator>
846          <type>RegexpComparator</type>
847          <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/file2</expected-output>
848        </comparator>
849      </comparators>
850    </test>
851   
852    <test> <!-- TESTED -->
853      <description>mv: file (absolute path) to directory (absolute path); change the name at the destination [ TIED to previous test ]</description>
854      <test-commands>
855        <command>-fs NAMENODE -ls /file1</command>       
856      </test-commands>
857      <cleanup-commands>
858      </cleanup-commands>
859      <comparators>
860        <comparator>
861          <type>TokenComparator</type>
862          <expected-output>ls: Cannot access /file1: No such file or directory.</expected-output>
863        </comparator>
864      </comparators>
865    </test>
866   
867    <test> <!-- TESTED -->
868      <description>mv: files (absolute path) to directory (absolute path) using globbing</description>
869      <test-commands>
870        <command>-fs NAMENODE -touchz /file1</command>
871        <command>-fs NAMENODE -touchz /file2</command>
872        <command>-fs NAMENODE -touchz /file3</command>
873        <command>-fs NAMENODE -touchz /file4</command>
874        <command>-fs NAMENODE -mkdir /dir0</command>
875        <command>-fs NAMENODE -mv /file* /dir0</command>
876        <command>-fs NAMENODE -lsr /*</command>       
877      </test-commands>
878      <cleanup-commands>
879        <command>-fs NAMENODE -rmr /dir0</command>
880      </cleanup-commands>
881      <comparators>
882        <comparator>
883          <type>RegexpComparator</type>
884          <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/file1</expected-output>
885        </comparator>
886        <comparator>
887          <type>RegexpComparator</type>
888          <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/file2</expected-output>
889        </comparator>
890        <comparator>
891          <type>RegexpComparator</type>
892          <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/file3</expected-output>
893        </comparator>
894        <comparator>
895          <type>RegexpComparator</type>
896          <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/file4</expected-output>
897        </comparator>
898      </comparators>
899    </test>
900   
901    <test> <!-- TESTED -->
902      <description>mv: files (absolute path) to directory (absolute path) using globbing [ TIED to previous test ]</description>
903      <test-commands>
904        <command>-fs NAMENODE -ls /file*</command>       
905      </test-commands>
906      <cleanup-commands>
907      </cleanup-commands>
908      <comparators>
909        <comparator>
910          <type>TokenComparator</type>
911          <expected-output>ls: Cannot access /file*: No such file or directory.</expected-output>
912        </comparator>
913      </comparators>
914    </test>
915   
916    <test> <!-- TESTED -->
917      <description>mv: file (relative) to file (relative)</description>
918      <test-commands>
919        <command>-fs NAMENODE -touchz file1</command>
920        <command>-fs NAMENODE -mv file1 file2</command>
921        <command>-fs NAMENODE -ls file*</command>       
922      </test-commands>
923      <cleanup-commands>
924        <command>-fs NAMENODE -rm /user</command>
925      </cleanup-commands>
926      <comparators>
927        <comparator>
928          <type>TokenComparator</type>
929          <expected-output>Found 1 items</expected-output>
930        </comparator>
931        <comparator>
932          <type>RegexpComparator</type>
933          <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,}( )*/user/[a-z]*/file2</expected-output>
934        </comparator>
935        <comparator>
936          <type>RegexpComparator</type>
937          <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,}( )*/user/[a-z]*/file[^1]</expected-output>
938        </comparator>
939      </comparators>
940    </test>
941   
942    <!-- Tests for cp-->
943    <test> <!-- TESTED -->
944      <description>cp: file (absolute path) to file (absolute path)</description>
945      <test-commands>
946        <command>-fs NAMENODE -touchz /file1</command>
947        <command>-fs NAMENODE -cp /file1 /file2</command>
948        <command>-fs NAMENODE -ls /file*</command>       
949      </test-commands>
950      <cleanup-commands>
951        <command>-fs NAMENODE -rm /file*</command>
952      </cleanup-commands>:
953      <comparators>
954        <comparator>
955          <type>RegexpComparator</type>
956          <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>
957        </comparator>
958        <comparator>
959          <type>RegexpComparator</type>
960          <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>
961        </comparator>
962      </comparators>
963    </test>
964   
965    <test> <!-- TESTED -->
966      <description>cp: file (absolute path) to file (relative path)</description>
967      <test-commands>
968        <command>-fs NAMENODE -touchz /file1</command>
969        <command>-fs NAMENODE -cp /file1 file2</command>
970        <command>-fs NAMENODE -ls /file1 file2</command>
971      </test-commands>
972      <cleanup-commands>
973        <command>-fs NAMENODE -rmr /file1 file2</command>
974      </cleanup-commands>
975      <comparators>
976        <comparator>
977          <type>RegexpComparator</type>
978          <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>
979        </comparator>
980        <comparator>
981          <type>RegexpComparator</type>
982          <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,}( )*/user/[a-z]*/file2</expected-output>
983        </comparator>
984      </comparators>
985    </test>
986   
987    <test> <!-- TESTED -->
988      <description>cp: file (relative path) to file (absolute path)</description>
989      <test-commands>
990        <command>-fs NAMENODE -touchz file1</command>
991        <command>-fs NAMENODE -cp file1 /file2</command>
992        <command>-fs NAMENODE -ls file1 /file2</command>
993      </test-commands>
994      <cleanup-commands>
995        <command>-fs NAMENODE -rmr file1 /file2</command>
996      </cleanup-commands>
997      <comparators>
998        <comparator>
999          <type>RegexpComparator</type>
1000          <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,}( )*/user/[a-z]*/file1</expected-output>
1001        </comparator>
1002        <comparator>
1003          <type>RegexpComparator</type>
1004          <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>
1005        </comparator>
1006      </comparators>
1007    </test>
1008   
1009    <test> <!-- TESTED -->
1010      <description>cp: file (relative path) to file (relative path)</description>
1011      <test-commands>
1012        <command>-fs NAMENODE -touchz file1</command>
1013        <command>-fs NAMENODE -cp file1 file2</command>
1014        <command>-fs NAMENODE -ls file1 file2</command>
1015      </test-commands>
1016      <cleanup-commands>
1017        <command>-fs NAMENODE -rmr file1 file2</command>
1018      </cleanup-commands>
1019      <comparators>
1020        <comparator>
1021          <type>RegexpComparator</type>
1022          <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,}( )*/user/[a-z]*/file1</expected-output>
1023        </comparator>
1024        <comparator>
1025          <type>RegexpComparator</type>
1026          <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,}( )*/user/[a-z]*/file2</expected-output>
1027        </comparator>
1028      </comparators>
1029    </test>
1030   
1031    <test> <!-- TESTED -->
1032      <description>cp: file (absolute path) to directory (absolute path); keep the same name at the destination</description>
1033      <test-commands>
1034        <command>-fs NAMENODE -touchz /file1</command>
1035        <command>-fs NAMENODE -mkdir /dir0</command>
1036        <command>-fs NAMENODE -cp /file1 /dir0</command>
1037        <command>-fs NAMENODE -ls /file1 /dir0</command>       
1038      </test-commands>
1039      <cleanup-commands>
1040        <command>-fs NAMENODE -rmr /dir0</command>
1041      </cleanup-commands>
1042      <comparators>
1043        <comparator>
1044          <type>RegexpComparator</type>
1045          <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>
1046        </comparator>
1047        <comparator>
1048          <type>RegexpComparator</type>
1049          <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/file1</expected-output>
1050        </comparator>
1051      </comparators>
1052    </test>
1053   
1054    <test> <!-- TESTED -->
1055      <description>cp: file (absolute path) to directory (absolute path); change the name at the destination</description>
1056      <test-commands>
1057        <command>-fs NAMENODE -touchz /file1</command>
1058        <command>-fs NAMENODE -mkdir /dir0</command>
1059        <command>-fs NAMENODE -cp /file1 /dir0/file2</command>
1060        <command>-fs NAMENODE -ls /file1 /dir0</command>       
1061      </test-commands>
1062      <cleanup-commands>
1063        <command>-fs NAMENODE -rmr /dir0</command>
1064      </cleanup-commands>
1065      <comparators>
1066        <comparator>
1067          <type>RegexpComparator</type>
1068          <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>
1069        </comparator>
1070        <comparator>
1071          <type>RegexpComparator</type>
1072          <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/file2</expected-output>
1073        </comparator>
1074      </comparators>
1075    </test>
1076   
1077    <test> <!-- TESTED -->
1078      <description>cp: files to directory (absolute path) using globbing</description>
1079      <test-commands>
1080        <command>-fs NAMENODE -touchz /file1</command>
1081        <command>-fs NAMENODE -touchz /file2</command>
1082        <command>-fs NAMENODE -touchz /file3</command>
1083        <command>-fs NAMENODE -touchz /file4</command>
1084        <command>-fs NAMENODE -mkdir /dir0</command>
1085        <command>-fs NAMENODE -cp /file* /dir0</command>
1086        <command>-fs NAMENODE -lsr /*</command>       
1087      </test-commands>
1088      <cleanup-commands>
1089        <command>-fs NAMENODE -rmr /dir0</command>
1090      </cleanup-commands>
1091      <comparators>
1092        <comparator>
1093          <type>RegexpComparator</type>
1094          <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>
1095        </comparator>
1096        <comparator>
1097          <type>RegexpComparator</type>
1098          <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>
1099        </comparator>
1100        <comparator>
1101          <type>RegexpComparator</type>
1102          <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>
1103        </comparator>
1104        <comparator>
1105          <type>RegexpComparator</type>
1106          <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>
1107        </comparator>
1108        <comparator>
1109          <type>RegexpComparator</type>
1110          <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/file1</expected-output>
1111        </comparator>
1112        <comparator>
1113          <type>RegexpComparator</type>
1114          <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/file2</expected-output>
1115        </comparator>
1116        <comparator>
1117          <type>RegexpComparator</type>
1118          <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/file3</expected-output>
1119        </comparator>
1120        <comparator>
1121          <type>RegexpComparator</type>
1122          <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/file4</expected-output>
1123        </comparator>
1124      </comparators>
1125    </test>
1126   
1127    <test> <!-- TESTED -->
1128      <description>cp: files to directory (absolute path) without globbing</description>
1129      <test-commands>
1130        <command>-fs NAMENODE -touchz /file1</command>
1131        <command>-fs NAMENODE -touchz /file2</command>
1132        <command>-fs NAMENODE -touchz /file3</command>
1133        <command>-fs NAMENODE -touchz /file4</command>
1134        <command>-fs NAMENODE -mkdir /dir0</command>
1135        <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 /dir0</command>
1136        <command>-fs NAMENODE -lsr /*</command>
1137      </test-commands>
1138      <cleanup-commands>
1139        <command>-fs NAMENODE -rmr /dir0</command>
1140      </cleanup-commands>
1141      <comparators>
1142        <comparator>
1143          <type>RegexpComparator</type>
1144          <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>
1145        </comparator>
1146        <comparator>
1147          <type>RegexpComparator</type>
1148          <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>
1149        </comparator>
1150        <comparator>
1151          <type>RegexpComparator</type>
1152          <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>
1153        </comparator>
1154        <comparator>
1155          <type>RegexpComparator</type>
1156          <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>
1157        </comparator>
1158        <comparator>
1159          <type>RegexpComparator</type>
1160          <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/file1</expected-output>
1161        </comparator>
1162        <comparator>
1163          <type>RegexpComparator</type>
1164          <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/file2</expected-output>
1165        </comparator>
1166        <comparator>
1167          <type>RegexpComparator</type>
1168          <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/file3</expected-output>
1169        </comparator>
1170        <comparator>
1171          <type>RegexpComparator</type>
1172          <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/file4</expected-output>
1173        </comparator>
1174      </comparators>
1175    </test>
1176   
1177    <test> <!-- TESTED -->
1178      <description>cp: copying non existent file (absolute path)</description>
1179      <test-commands>
1180        <command>-fs NAMENODE -cp /file /file1</command>
1181      </test-commands>
1182      <cleanup-commands>
1183        <command>-fs NAMENODE -rmr /user</command>
1184      </cleanup-commands>:
1185      <comparators>
1186        <comparator>
1187          <type>RegexpComparator</type>
1188          <expected-output>^cp: File does not exist: /file</expected-output>
1189        </comparator>
1190      </comparators>
1191    </test>
1192   
1193    <test> <!-- TESTED -->
1194      <description>cp: copying non existent file (relative path)</description>
1195      <test-commands>
1196        <command>-fs NAMENODE -cp file1 file2</command>
1197      </test-commands>
1198      <cleanup-commands>
1199        <command>-fs NAMENODE -rmr /user</command>
1200      </cleanup-commands>:
1201      <comparators>
1202        <comparator>
1203          <type>RegexpComparator</type>
1204          <expected-output>^cp: File does not exist: file1</expected-output>
1205        </comparator>
1206      </comparators>
1207    </test>
1208   
1209    <test> <!-- TESTED -->
1210      <description>cp: files to an existent file using globbing</description>
1211      <test-commands>
1212        <command>-fs NAMENODE -touchz /file1</command>
1213        <command>-fs NAMENODE -touchz /file2</command>
1214        <command>-fs NAMENODE -touchz /file3</command>
1215        <command>-fs NAMENODE -touchz /file4</command>
1216        <command>-fs NAMENODE -touchz /file5</command>
1217        <command>-fs NAMENODE -cp /file* /file5</command>
1218      </test-commands>
1219      <cleanup-commands>
1220        <command>-fs NAMENODE -rmr /user</command>
1221      </cleanup-commands>
1222      <comparators>
1223        <comparator>
1224          <type>RegexpComparator</type>
1225          <expected-output>^cp: When copying multiple files, destination should be a directory.</expected-output>
1226        </comparator>
1227      </comparators>
1228    </test>
1229   
1230    <test> <!-- TESTED -->
1231      <description>cp: files to an existent file without globbing</description>
1232      <test-commands>
1233        <command>-fs NAMENODE -touchz /file1</command>
1234        <command>-fs NAMENODE -touchz /file2</command>
1235        <command>-fs NAMENODE -touchz /file3</command>
1236        <command>-fs NAMENODE -touchz /file4</command>
1237        <command>-fs NAMENODE -touchz /file5</command>
1238        <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 /file5</command>
1239      </test-commands>
1240      <cleanup-commands>
1241        <command>-fs NAMENODE -rmr /user</command>
1242      </cleanup-commands>
1243      <comparators>
1244        <comparator>
1245          <type>RegexpComparator</type>
1246          <expected-output>^cp: When copying multiple files, destination /file5 should be a directory.</expected-output>
1247        </comparator>
1248      </comparators>
1249    </test>
1250   
1251    <test> <!-- TESTED -->
1252      <description>cp: files to a non existent directory using globbing</description>
1253      <test-commands>
1254        <command>-fs NAMENODE -touchz /file1</command>
1255        <command>-fs NAMENODE -touchz /file2</command>
1256        <command>-fs NAMENODE -touchz /file3</command>
1257        <command>-fs NAMENODE -touchz /file4</command>
1258        <command>-fs NAMENODE -cp /file* dir</command>
1259      </test-commands>
1260      <cleanup-commands>
1261        <command>-fs NAMENODE -rmr /user</command>
1262      </cleanup-commands>
1263      <comparators>
1264        <comparator>
1265          <type>RegexpComparator</type>
1266          <expected-output>^cp: When copying multiple files, destination should be a directory.</expected-output>
1267        </comparator>
1268      </comparators>
1269    </test>
1270   
1271    <test> <!-- TESTED -->
1272      <description>cp: files to a non existent directory without globbing</description>
1273      <test-commands>
1274        <command>-fs NAMENODE -touchz /file1</command>
1275        <command>-fs NAMENODE -touchz /file2</command>
1276        <command>-fs NAMENODE -touchz /file3</command>
1277        <command>-fs NAMENODE -touchz /file4</command>
1278        <command>-fs NAMENODE -cp /file1 /file2 /file3 /file4 dir</command>
1279      </test-commands>
1280      <cleanup-commands>
1281        <command>-fs NAMENODE -rmr /user</command>
1282      </cleanup-commands>
1283      <comparators>
1284        <comparator>
1285          <type>RegexpComparator</type>
1286          <expected-output>^cp: When copying multiple files, destination dir should be a directory.</expected-output>
1287        </comparator>
1288      </comparators>
1289    </test>
1290   
1291    <!-- Tests for rm -->
1292    <test> <!-- TESTED -->
1293      <description>rm: removing a file (absolute path) </description>
1294      <test-commands>
1295        <command>-fs NAMENODE -touchz /dir0/file0</command>
1296        <command>-fs NAMENODE -rm /dir0/file0</command>
1297      </test-commands>
1298      <cleanup-commands>
1299        <command>-fs NAMENODE -rm /user</command>
1300      </cleanup-commands>
1301      <comparators>
1302        <comparator>
1303          <type>RegexpComparator</type>
1304          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output>
1305        </comparator>
1306      </comparators>
1307    </test>
1308   
1309    <test> <!-- TESTED -->
1310      <description>rm: removing a file (relative path) </description>
1311      <test-commands>
1312        <command>-fs NAMENODE -touchz file0</command>
1313        <command>-fs NAMENODE -rm file0</command>
1314      </test-commands>
1315      <cleanup-commands>
1316        <command>-fs NAMENODE -rm /user</command>
1317      </cleanup-commands>
1318      <comparators>
1319        <comparator>
1320          <type>RegexpComparator</type>
1321          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output>
1322        </comparator>
1323      </comparators>
1324    </test>
1325   
1326    <test> <!-- TESTED -->
1327      <description>rm: removing files by globbing (absolute path) </description>
1328      <test-commands>
1329        <command>-fs NAMENODE -touchz /dir0/file0</command>
1330        <command>-fs NAMENODE -touchz /dir0/file1</command>
1331        <command>-fs NAMENODE -touchz /dir0/file2</command>
1332        <command>-fs NAMENODE -touchz /dir0/file3</command>
1333        <command>-fs NAMENODE -rm /dir0/file*</command>
1334      </test-commands>
1335      <cleanup-commands>
1336        <command>-fs NAMENODE -rm /user</command>
1337      </cleanup-commands>
1338      <comparators>
1339        <comparator>
1340          <type>RegexpComparator</type>
1341          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output>
1342        </comparator>
1343        <comparator>
1344          <type>RegexpComparator</type>
1345          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0/file1</expected-output>
1346        </comparator>
1347        <comparator>
1348          <type>RegexpComparator</type>
1349          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0/file2</expected-output>
1350        </comparator>
1351        <comparator>
1352          <type>RegexpComparator</type>
1353          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0/file3</expected-output>
1354        </comparator>
1355      </comparators>
1356    </test>
1357   
1358    <test> <!-- TESTED -->
1359      <description>rm: removing files by globbing (relative path) </description>
1360      <test-commands>
1361        <command>-fs NAMENODE -touchz file0</command>
1362        <command>-fs NAMENODE -touchz file1</command>
1363        <command>-fs NAMENODE -touchz file2</command>
1364        <command>-fs NAMENODE -touchz file3</command>
1365        <command>-fs NAMENODE -rm file*</command>
1366      </test-commands>
1367      <cleanup-commands>
1368        <command>-fs NAMENODE -rm /user</command>
1369      </cleanup-commands>
1370      <comparators>
1371        <comparator>
1372          <type>RegexpComparator</type>
1373          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output>
1374        </comparator>
1375        <comparator>
1376          <type>RegexpComparator</type>
1377          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file1</expected-output>
1378        </comparator>
1379        <comparator>
1380          <type>RegexpComparator</type>
1381          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file2</expected-output>
1382        </comparator>
1383        <comparator>
1384          <type>RegexpComparator</type>
1385          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file3</expected-output>
1386        </comparator>
1387      </comparators>
1388    </test>
1389   
1390    <test> <!-- TESTED -->
1391      <description>rm: removing a directory (absolute path) </description>
1392      <test-commands>
1393        <command>-fs NAMENODE mkdir /dir0</command>
1394        <command>-fs NAMENODE -rm /dir0</command>
1395      </test-commands>
1396      <cleanup-commands>
1397        <command>-fs NAMENODE -rm /user</command>
1398      </cleanup-commands>
1399      <comparators>
1400        <comparator>
1401          <type>RegexpComparator</type>
1402          <expected-output>^rm: Cannot remove directory "hdfs://localhost[.a-z]*:[0-9]*/dir0", use -rmr instead</expected-output>
1403        </comparator>
1404      </comparators>
1405    </test>
1406   
1407    <test> <!-- TESTED -->
1408      <description>rm: removing a directory (relative path) </description>
1409      <test-commands>
1410        <command>-fs NAMENODE mkdir dir0</command>
1411        <command>-fs NAMENODE -rm dir0</command>
1412      </test-commands>
1413      <cleanup-commands>
1414        <command>-fs NAMENODE -rm /user</command>
1415      </cleanup-commands>
1416      <comparators>
1417        <comparator>
1418          <type>RegexpComparator</type>
1419          <expected-output>^rm: cannot remove dir0: No such file or directory.</expected-output>
1420        </comparator>
1421      </comparators>
1422    </test>
1423   
1424    <test> <!-- TESTED -->
1425      <description>rm: removing a nonexistent file (absolute path) </description>
1426      <test-commands>
1427        <command>-fs NAMENODE -rm /dir0/file0</command>
1428      </test-commands>
1429      <cleanup-commands>
1430        <command>-fs NAMENODE -rm /user</command>
1431      </cleanup-commands>
1432      <comparators>
1433        <comparator>
1434          <type>RegexpComparator</type>
1435          <expected-output>^rm: cannot remove /dir0/file0: No such file or directory.</expected-output>
1436        </comparator>
1437      </comparators>
1438    </test>
1439   
1440    <test> <!-- TESTED -->
1441      <description>rm: removing a nonexistent file (relative path) </description>
1442      <test-commands>
1443        <command>-fs NAMENODE -rm file0</command>
1444      </test-commands>
1445      <cleanup-commands>
1446        <command>-fs NAMENODE -rm /user</command>
1447      </cleanup-commands>
1448      <comparators>
1449        <comparator>
1450          <type>RegexpComparator</type>
1451          <expected-output>^rm: cannot remove file0: No such file or directory.</expected-output>
1452        </comparator>
1453      </comparators>
1454    </test>
1455   
1456    <!--Tests for rmr-->
1457    <test> <!-- TESTED -->
1458      <description>rmr: removing a file (absolute path) </description>
1459      <test-commands>
1460        <command>-fs NAMENODE -touchz /dir0/file0</command>
1461        <command>-fs NAMENODE -rmr /dir0/file0</command>
1462      </test-commands>
1463      <cleanup-commands>
1464        <command>-fs NAMENODE -rmr /user</command>
1465      </cleanup-commands>
1466      <comparators>
1467        <comparator>
1468          <type>RegexpComparator</type>
1469          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output>
1470        </comparator>
1471      </comparators>
1472    </test>
1473   
1474    <test> <!-- TESTED -->
1475      <description>rmr: removing a file (relative path) </description>
1476      <test-commands>
1477        <command>-fs NAMENODE -touchz file0</command>
1478        <command>-fs NAMENODE -rmr file0</command>
1479      </test-commands>
1480      <cleanup-commands>
1481        <command>-fs NAMENODE -rmr /user</command>
1482      </cleanup-commands>
1483      <comparators>
1484        <comparator>
1485          <type>RegexpComparator</type>
1486          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output>
1487        </comparator>
1488      </comparators>
1489    </test>
1490   
1491    <test> <!-- TESTED -->
1492      <description>rmr: removing a directory (absolute path) </description>
1493      <test-commands>
1494        <command>-fs NAMENODE -touchz /dir0</command>
1495        <command>-fs NAMENODE -rmr /dir0</command>
1496      </test-commands>
1497      <cleanup-commands>
1498        <command>-fs NAMENODE -rmr /user</command>
1499      </cleanup-commands>
1500      <comparators>
1501        <comparator>
1502          <type>RegexpComparator</type>
1503          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output>
1504        </comparator>
1505      </comparators>
1506    </test>
1507   
1508    <test> <!-- TESTED -->
1509      <description>rmr: removing a directory (relative path) </description>
1510      <test-commands>
1511        <command>-fs NAMENODE -mkdir dir0</command>
1512        <command>-fs NAMENODE -rmr dir0</command>
1513      </test-commands>
1514      <cleanup-commands>
1515        <command>-fs NAMENODE -rmr /user</command>
1516      </cleanup-commands>
1517      <comparators>
1518        <comparator>
1519          <type>RegexpComparator</type>
1520          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0</expected-output>
1521        </comparator>
1522      </comparators>
1523    </test>
1524   
1525    <test> <!-- TESTED -->
1526      <description>rmr: removing directories by globbing (absolute path) </description>
1527      <test-commands>
1528        <command>-fs NAMENODE -mkdir /dir0</command>
1529        <command>-fs NAMENODE -mkdir /dir1</command>
1530        <command>-fs NAMENODE -mkdir /dir2</command>
1531        <command>-fs NAMENODE -mkdir /dir3</command>
1532        <command>-fs NAMENODE -rmr /dir*</command>
1533      </test-commands>
1534      <cleanup-commands>
1535        <command>-fs NAMENODE -rm /user</command>
1536      </cleanup-commands>
1537      <comparators>
1538        <comparator>
1539          <type>RegexpComparator</type>
1540          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir0</expected-output>
1541        </comparator>
1542        <comparator>
1543          <type>RegexpComparator</type>
1544          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir1</expected-output>
1545        </comparator>
1546        <comparator>
1547          <type>RegexpComparator</type>
1548          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir2</expected-output>
1549        </comparator>
1550        <comparator>
1551          <type>RegexpComparator</type>
1552          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/dir3</expected-output>
1553        </comparator>
1554      </comparators>
1555    </test>
1556   
1557    <test> <!-- TESTED -->
1558      <description>rmr: removing directories by globbing (relative path) </description>
1559      <test-commands>
1560        <command>-fs NAMENODE -mkdir dir0</command>
1561        <command>-fs NAMENODE -mkdir dir1</command>
1562        <command>-fs NAMENODE -mkdir dir2</command>
1563        <command>-fs NAMENODE -mkdir dir3</command>
1564        <command>-fs NAMENODE -rmr dir*</command>
1565      </test-commands>
1566      <cleanup-commands>
1567        <command>-fs NAMENODE -rm /user</command>
1568      </cleanup-commands>
1569      <comparators>
1570        <comparator>
1571          <type>RegexpComparator</type>
1572          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0</expected-output>
1573        </comparator>
1574        <comparator>
1575          <type>RegexpComparator</type>
1576          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir1</expected-output>
1577        </comparator>
1578        <comparator>
1579          <type>RegexpComparator</type>
1580          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir2</expected-output>
1581        </comparator>
1582        <comparator>
1583          <type>RegexpComparator</type>
1584          <expected-output>^Deleted hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir3</expected-output>
1585        </comparator>
1586      </comparators>
1587    </test>
1588   
1589    <test> <!--TESTED-->
1590      <description>rmr: removing a nonexistent file (absolute path) </description>
1591      <test-commands>
1592        <command>-fs NAMENODE -rmr /dir0/file0</command>
1593      </test-commands>
1594      <cleanup-commands>
1595        <command>-fs NAMENODE -rmr /user</command>
1596      </cleanup-commands>
1597      <comparators>
1598        <comparator>
1599          <type>RegexpComparator</type>
1600          <expected-output>^rmr: cannot remove /dir0/file0: No such file or directory.</expected-output>
1601        </comparator>
1602      </comparators>
1603    </test>
1604   
1605    <test> <!-- TESTED -->
1606      <description>rmr: removing a nonexistent file (relative path) </description>
1607      <test-commands>
1608        <command>-fs NAMENODE -rmr file0</command>
1609      </test-commands>
1610      <cleanup-commands>
1611        <command>-fs NAMENODE -rmr /user</command>
1612      </cleanup-commands>
1613      <comparators>
1614        <comparator>
1615          <type>RegexpComparator</type>
1616          <expected-output>^rmr: cannot remove file0: No such file or directory.</expected-output>
1617        </comparator>
1618      </comparators>
1619    </test>
1620   
1621    <!-- Tests for expunge -->
1622    <!-- Not yet implemented -->
1623
1624    <!-- Tests for put -->
1625    <test> <!-- TESTED -->
1626      <description>put: putting file into a file (absolute path)</description>
1627      <test-commands>
1628        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
1629        <command>-fs NAMENODE -du /data15bytes</command>
1630      </test-commands>
1631      <cleanup-commands>
1632        <command>-fs NAMENODE -rm /data15bytes</command>
1633      </cleanup-commands>
1634      <comparators>
1635        <comparator>
1636          <type>TokenComparator</type>
1637          <expected-output>Found 1 items</expected-output>
1638        </comparator>
1639        <comparator>
1640          <type>RegexpComparator</type>
1641          <expected-output>^15( |\t)*hdfs://localhost.*:[0-9]*/data15bytes</expected-output>
1642        </comparator>
1643      </comparators>
1644    </test>
1645   
1646    <test> <!-- TESTED -->
1647      <description>put: putting file into a file (relative path)</description>
1648      <test-commands>
1649        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
1650        <command>-fs NAMENODE -du data15bytes</command>
1651      </test-commands>
1652      <cleanup-commands>
1653        <command>-fs NAMENODE -rmr /user</command>
1654      </cleanup-commands>
1655      <comparators>
1656        <comparator>
1657          <type>TokenComparator</type>
1658          <expected-output>Found 1 items</expected-output>
1659        </comparator>
1660        <comparator>
1661          <type>RegexpComparator</type>
1662          <expected-output>^15( |\t)*hdfs://localhost.*:[0-9]*/user/[a-z]*/data15bytes</expected-output>
1663        </comparator>
1664      </comparators>
1665    </test>
1666   
1667    <test> <!-- TESTED -->
1668      <description>put: putting file into a directory(absolute path)</description>
1669      <test-commands>
1670        <command>-fs NAMENODE -put CLITEST_DATA /dir0/dir1/data</command>
1671        <command>-fs NAMENODE -du /dir0/dir1/data</command>
1672      </test-commands>
1673      <cleanup-commands>
1674        <command>-fs NAMENODE -rmr /dir0</command>
1675      </cleanup-commands>
1676      <comparators>
1677        <comparator>
1678          <type>RegexpComparator</type>
1679          <expected-output>^15( |\t)*hdfs://localhost.*:[0-9]*/dir0/dir1/data/data15bytes</expected-output>
1680        </comparator>
1681        <comparator>
1682          <type>RegexpComparator</type>
1683          <expected-output>^30( |\t)*hdfs://localhost.*:[0-9]*/dir0/dir1/data/data30bytes</expected-output>
1684        </comparator>
1685        <comparator>
1686          <type>RegexpComparator</type>
1687          <expected-output>^60( |\t)*hdfs://localhost.*:[0-9]*/dir0/dir1/data/data60bytes</expected-output>
1688        </comparator>
1689        <comparator>
1690          <type>RegexpComparator</type>
1691          <expected-output>^120( |\t)*hdfs://localhost.*:[0-9]*/dir0/dir1/data/data120bytes</expected-output>
1692        </comparator>
1693      </comparators>
1694    </test>
1695   
1696    <test> <!-- TESTED -->
1697      <description>put: putting file into a directory(relative path)</description>
1698      <test-commands>
1699        <command>-fs NAMENODE -put CLITEST_DATA dir0/dir1/data</command>
1700        <command>-fs NAMENODE -du dir0/dir1/data</command>
1701      </test-commands>
1702      <cleanup-commands>
1703        <command>-fs NAMENODE -rmr /user</command>
1704      </cleanup-commands>
1705      <comparators>
1706        <comparator>
1707          <type>RegexpComparator</type>
1708          <expected-output>^15( |\t)*hdfs://localhost.*:[0-9]*/user/[a-z]*/dir0/dir1/data/data15bytes</expected-output>
1709        </comparator>
1710        <comparator>
1711          <type>RegexpComparator</type>
1712          <expected-output>^30( |\t)*hdfs://localhost.*:[0-9]*/user/[a-z]*/dir0/dir1/data/data30bytes</expected-output>
1713        </comparator>
1714        <comparator>
1715          <type>RegexpComparator</type>
1716          <expected-output>^60( |\t)*hdfs://localhost.*:[0-9]*/user/[a-z]*/dir0/dir1/data/data60bytes</expected-output>
1717        </comparator>
1718        <comparator>
1719          <type>RegexpComparator</type>
1720          <expected-output>^120( |\t)*hdfs://localhost.*:[0-9]*/user/[a-z]*/dir0/dir1/data/data120bytes</expected-output>
1721        </comparator>
1722      </comparators>
1723    </test>
1724   
1725    <test> <!-- TESTED -->
1726      <description>put: putting many files into an existing directory(absolute path)</description>
1727      <test-commands>
1728        <command>-fs NAMENODE -mkdir /dir0</command>
1729        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes /dir0</command>
1730        <command>-fs NAMENODE -du /dir0</command>
1731      </test-commands>
1732      <cleanup-commands>
1733        <command>-fs NAMENODE -rmr /user</command>
1734      </cleanup-commands>
1735      <comparators>
1736        <comparator>
1737          <type>TokenComparator</type>
1738          <expected-output>Found 2 items</expected-output>
1739        </comparator>
1740        <comparator>
1741          <type>RegexpComparator</type>
1742          <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output>
1743        </comparator>
1744        <comparator>
1745          <type>RegexpComparator</type>
1746          <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data30bytes</expected-output>
1747        </comparator>
1748      </comparators>
1749    </test>
1750   
1751    <test> <!-- TESTED -->
1752      <description>put: putting many files into an existing directory(relative path)</description>
1753      <test-commands>
1754        <command>-fs NAMENODE -mkdir dir0</command>
1755        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0</command>
1756        <command>-fs NAMENODE -du dir0</command>
1757      </test-commands>
1758      <cleanup-commands>
1759        <command>-fs NAMENODE -rmr /user</command>
1760      </cleanup-commands>
1761      <comparators>
1762        <comparator>
1763          <type>TokenComparator</type>
1764          <expected-output>Found 2 items</expected-output>
1765        </comparator>
1766        <comparator>
1767          <type>RegexpComparator</type>
1768          <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/data15bytes</expected-output>
1769        </comparator>
1770        <comparator>
1771          <type>RegexpComparator</type>
1772          <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/data30bytes</expected-output>
1773        </comparator>
1774      </comparators>
1775    </test>
1776   
1777    <test> <!-- TESTED -->
1778      <description>put: putting non existent file(absolute path)</description>
1779      <test-commands>
1780        <command>-fs NAMENODE -put /user/wrongdata file</command>
1781      </test-commands>
1782      <cleanup-commands>
1783        <command>-fs NAMENODE -rmr /user</command>
1784      </cleanup-commands>
1785      <comparators>
1786        <comparator>
1787          <type>TokenComparator</type>
1788          <expected-output>put: File /user/wrongdata does not exist</expected-output>
1789        </comparator>
1790      </comparators>
1791    </test>
1792   
1793    <test> <!-- TESTED -->
1794      <description>put: putting non existent file(relative path)</description>
1795      <test-commands>
1796        <command>-fs NAMENODE -put wrongdata file</command>
1797      </test-commands>
1798      <cleanup-commands>
1799        <command>-fs NAMENODE -rmr /user</command>
1800      </cleanup-commands>
1801      <comparators>
1802        <comparator>
1803          <type>TokenComparator</type>
1804          <expected-output>put: File wrongdata does not exist</expected-output>
1805        </comparator>
1806      </comparators>
1807    </test>
1808   
1809    <test> <!-- TESTED -->
1810      <description>put: putting file into an already existing destination(absolute path)</description>
1811      <test-commands>
1812        <command>-fs NAMENODE -touchz /user/file0</command>
1813        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /user/file0</command>
1814      </test-commands>
1815      <cleanup-commands>
1816        <command>-fs NAMENODE -rmr /user</command>
1817      </cleanup-commands>
1818      <comparators>
1819        <comparator>
1820          <type>TokenComparator</type>
1821          <expected-output>put: Target /user/file0 already exists</expected-output>
1822        </comparator>
1823      </comparators>
1824    </test>
1825   
1826    <test> <!-- TESTED -->
1827      <description>put: putting file into an already existing destination(relative path)</description>
1828      <test-commands>
1829        <command>-fs NAMENODE -touchz file0</command>
1830        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes file0</command>
1831      </test-commands>
1832      <cleanup-commands>
1833        <command>-fs NAMENODE -rmr /user</command>
1834      </cleanup-commands>
1835      <comparators>
1836        <comparator>
1837          <type>TokenComparator</type>
1838          <expected-output>put: Target file0 already exists</expected-output>
1839        </comparator>
1840      </comparators>
1841    </test>
1842   
1843    <test> <!-- TESTED -->
1844      <description>put: putting many files into an existing file</description>
1845      <test-commands>
1846        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
1847        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /data30bytes</command>
1848        <command>-fs NAMENODE -touchz file0</command>
1849        <command>-fs NAMENODE -put /data15bytes /data30bytes file0</command>
1850      </test-commands>
1851      <cleanup-commands>
1852        <command>-fs NAMENODE -rmr /user</command>
1853      </cleanup-commands>
1854      <comparators>
1855        <comparator>
1856          <type>RegexpComparator</type>
1857          <expected-output>^put: copying multiple files, but last argument `file0' is not a directory</expected-output>
1858        </comparator>
1859      </comparators>
1860    </test>
1861   
1862    <test> <!-- TESTED -->
1863      <description>put: putting many files into a non existent directory</description>
1864      <test-commands>
1865        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
1866        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /data30bytes</command>
1867        <command>-fs NAMENODE -put /data15bytes /data30bytes wrongdir</command>
1868      </test-commands>
1869      <cleanup-commands>
1870        <command>-fs NAMENODE -rmr /user</command>
1871      </cleanup-commands>
1872      <comparators>
1873        <comparator>
1874          <type>RegexpComparator</type>
1875          <expected-output>^put: `wrongdir': specified destination directory doest not exist</expected-output>
1876        </comparator>
1877      </comparators>
1878    </test>
1879   
1880    <!-- Tests for copyFromLocal -->
1881    <test> <!-- TESTED -->
1882      <description>copyFromLocal: copying file into a file (absolute path)</description>
1883      <test-commands>
1884        <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
1885        <command>-fs NAMENODE -du /data15bytes</command>
1886      </test-commands>
1887      <cleanup-commands>
1888        <command>-fs NAMENODE -rm /data15bytes</command>
1889      </cleanup-commands>
1890      <comparators>
1891        <comparator>
1892          <type>TokenComparator</type>
1893          <expected-output>Found 1 items</expected-output>
1894        </comparator>
1895        <comparator>
1896          <type>RegexpComparator</type>
1897          <expected-output>^15( |\t)*hdfs://localhost.*:[0-9]*/data15bytes</expected-output>
1898        </comparator>
1899      </comparators>
1900    </test>
1901   
1902    <test> <!-- TESTED -->
1903      <description>copyFromLocal: copying file into a file (relative path)</description>
1904      <test-commands>
1905        <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes data15bytes</command>
1906        <command>-fs NAMENODE -du data15bytes</command>
1907      </test-commands>
1908      <cleanup-commands>
1909        <command>-fs NAMENODE -rmr /user</command>
1910      </cleanup-commands>
1911      <comparators>
1912        <comparator>
1913          <type>TokenComparator</type>
1914          <expected-output>Found 1 items</expected-output>
1915        </comparator>
1916        <comparator>
1917          <type>RegexpComparator</type>
1918          <expected-output>^15( |\t)*hdfs://localhost.*:[0-9]*/user/[a-z]*/data15bytes</expected-output>
1919        </comparator>
1920      </comparators>
1921    </test>
1922   
1923    <test> <!-- TESTED -->
1924      <description>copyFromLocal: copying file into a directory(absolute path)</description>
1925      <test-commands>
1926        <command>-fs NAMENODE -copyFromLocal CLITEST_DATA /dir0/dir1/data</command>
1927        <command>-fs NAMENODE -du /dir0/dir1/data</command>
1928      </test-commands>
1929      <cleanup-commands>
1930        <command>-fs NAMENODE -rmr /dir0</command>
1931      </cleanup-commands>
1932      <comparators>
1933        <comparator>
1934          <type>RegexpComparator</type>
1935          <expected-output>^15( |\t)*hdfs://localhost.*:[0-9]*/dir0/dir1/data/data15bytes</expected-output>
1936        </comparator>
1937        <comparator>
1938          <type>RegexpComparator</type>
1939          <expected-output>^30( |\t)*hdfs://localhost.*:[0-9]*/dir0/dir1/data/data30bytes</expected-output>
1940        </comparator>
1941        <comparator>
1942          <type>RegexpComparator</type>
1943          <expected-output>^60( |\t)*hdfs://localhost.*:[0-9]*/dir0/dir1/data/data60bytes</expected-output>
1944        </comparator>
1945        <comparator>
1946          <type>RegexpComparator</type>
1947          <expected-output>^120( |\t)*hdfs://localhost.*:[0-9]*/dir0/dir1/data/data120bytes</expected-output>
1948        </comparator>
1949      </comparators>
1950    </test>
1951   
1952    <test> <!-- TESTED -->
1953      <description>copyFromLocal: copying file into a directory(relative path)</description>
1954      <test-commands>
1955        <command>-fs NAMENODE -copyFromLocal CLITEST_DATA dir0/dir1/data</command>
1956        <command>-fs NAMENODE -du dir0/dir1/data</command>
1957      </test-commands>
1958      <cleanup-commands>
1959        <command>-fs NAMENODE -rmr /user</command>
1960      </cleanup-commands>
1961      <comparators>
1962        <comparator>
1963          <type>RegexpComparator</type>
1964          <expected-output>^15( |\t)*hdfs://localhost.*:[0-9]*/user/[a-z]*/dir0/dir1/data/data15bytes</expected-output>
1965        </comparator>
1966        <comparator>
1967          <type>RegexpComparator</type>
1968          <expected-output>^30( |\t)*hdfs://localhost.*:[0-9]*/user/[a-z]*/dir0/dir1/data/data30bytes</expected-output>
1969        </comparator>
1970        <comparator>
1971          <type>RegexpComparator</type>
1972          <expected-output>^60( |\t)*hdfs://localhost.*:[0-9]*/user/[a-z]*/dir0/dir1/data/data60bytes</expected-output>
1973        </comparator>
1974        <comparator>
1975          <type>RegexpComparator</type>
1976          <expected-output>^120( |\t)*hdfs://localhost.*:[0-9]*/user/[a-z]*/dir0/dir1/data/data120bytes</expected-output>
1977        </comparator>
1978      </comparators>
1979    </test>
1980   
1981    <test> <!-- TESTED -->
1982      <description>copyFromLocal: copying many files into an existing directory(absolute path)</description>
1983      <test-commands>
1984        <command>-fs NAMENODE -mkdir /dir0</command>
1985        <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes /dir0</command>
1986        <command>-fs NAMENODE -du /dir0</command>
1987      </test-commands>
1988      <cleanup-commands>
1989        <command>-fs NAMENODE -rmr /user</command>
1990      </cleanup-commands>
1991      <comparators>
1992        <comparator>
1993          <type>TokenComparator</type>
1994          <expected-output>Found 2 items</expected-output>
1995        </comparator>
1996        <comparator>
1997          <type>RegexpComparator</type>
1998          <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data15bytes</expected-output>
1999        </comparator>
2000        <comparator>
2001          <type>RegexpComparator</type>
2002          <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/dir0/data30bytes</expected-output>
2003        </comparator>
2004      </comparators>
2005    </test>
2006   
2007    <test> <!-- TESTED -->
2008      <description>copyFromLocal: copying many files into an existing directory(relative path)</description>
2009      <test-commands>
2010        <command>-fs NAMENODE -mkdir dir0</command>
2011        <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes CLITEST_DATA/data30bytes dir0</command>
2012        <command>-fs NAMENODE -du dir0</command>
2013      </test-commands>
2014      <cleanup-commands>
2015        <command>-fs NAMENODE -rmr /user</command>
2016      </cleanup-commands>
2017      <comparators>
2018        <comparator>
2019          <type>TokenComparator</type>
2020          <expected-output>Found 2 items</expected-output>
2021        </comparator>
2022        <comparator>
2023          <type>RegexpComparator</type>
2024          <expected-output>^15( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/data15bytes</expected-output>
2025        </comparator>
2026        <comparator>
2027          <type>RegexpComparator</type>
2028          <expected-output>^30( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/data30bytes</expected-output>
2029        </comparator>
2030      </comparators>
2031    </test>
2032   
2033    <test> <!-- TESTED -->
2034      <description>copyFromLocal: copying non existent file(absolute path)</description>
2035      <test-commands>
2036        <command>-fs NAMENODE -copyFromLocal /user/wrongdata file</command>
2037      </test-commands>
2038      <cleanup-commands>
2039        <command>-fs NAMENODE -rmr /user</command>
2040      </cleanup-commands>
2041      <comparators>
2042        <comparator>
2043          <type>TokenComparator</type>
2044          <expected-output>copyFromLocal: File /user/wrongdata does not exist</expected-output>
2045        </comparator>
2046      </comparators>
2047    </test>
2048   
2049    <test> <!-- TESTED -->
2050      <description>copyFromLocal: copying non existent file(relative path)</description>
2051      <test-commands>
2052        <command>-fs NAMENODE -copyFromLocal wrongdata file</command>
2053      </test-commands>
2054      <cleanup-commands>
2055        <command>-fs NAMENODE -rmr /user</command>
2056      </cleanup-commands>
2057      <comparators>
2058        <comparator>
2059          <type>TokenComparator</type>
2060          <expected-output>copyFromLocal: File wrongdata does not exist</expected-output>
2061        </comparator>
2062      </comparators>
2063    </test>
2064   
2065    <test> <!-- TESTED -->
2066      <description>copyFromLocal: copying file into an already existing destination(absolute path)</description>
2067      <test-commands>
2068        <command>-fs NAMENODE -touchz /user/file0</command>
2069        <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/file0</command>
2070      </test-commands>
2071      <cleanup-commands>
2072        <command>-fs NAMENODE -rmr /user</command>
2073      </cleanup-commands>
2074      <comparators>
2075        <comparator>
2076          <type>TokenComparator</type>
2077          <expected-output>copyFromLocal: Target /user/file0 already exists</expected-output>
2078        </comparator>
2079      </comparators>
2080    </test>
2081   
2082    <test> <!-- TESTED -->
2083      <description>copyFromLocal: copying file into an already existing destination(relative path)</description>
2084      <test-commands>
2085        <command>-fs NAMENODE -touchz file0</command>
2086        <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes file0</command>
2087      </test-commands>
2088      <cleanup-commands>
2089        <command>-fs NAMENODE -rmr /user</command>
2090      </cleanup-commands>
2091      <comparators>
2092        <comparator>
2093          <type>TokenComparator</type>
2094          <expected-output>copyFromLocal: Target file0 already exists</expected-output>
2095        </comparator>
2096      </comparators>
2097    </test>
2098   
2099    <test> <!-- TESTED -->
2100      <description>copyFromLocal: copying many files into an existing file</description>
2101      <test-commands>
2102        <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
2103        <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
2104        <command>-fs NAMENODE -touchz file0</command>
2105        <command>-fs NAMENODE -copyFromLocal /data15bytes /data30bytes file0</command>
2106      </test-commands>
2107      <cleanup-commands>
2108        <command>-fs NAMENODE -rmr /user</command>
2109      </cleanup-commands>
2110      <comparators>
2111        <comparator>
2112          <type>RegexpComparator</type>
2113          <expected-output>^copyFromLocal: copying multiple files, but last argument `file0' is not a directory</expected-output>
2114        </comparator>
2115      </comparators>
2116    </test>
2117   
2118    <test> <!-- TESTED -->
2119      <description>copyFromLocal: copying many files into a non existent directory</description>
2120      <test-commands>
2121        <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
2122        <command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
2123        <command>-fs NAMENODE -copyFromLocal /data15bytes /data30bytes wrongdir</command>
2124      </test-commands>
2125      <cleanup-commands>
2126        <command>-fs NAMENODE -rmr /user</command>
2127      </cleanup-commands>
2128      <comparators>
2129        <comparator>
2130          <type>RegexpComparator</type>
2131          <expected-output>^copyFromLocal: `wrongdir': specified destination directory doest not exist</expected-output>
2132        </comparator>
2133      </comparators>
2134    </test>
2135   
2136    <!-- Tests for get -->
2137    <test> <!-- TESTED -->
2138      <description>get: getting non existent(absolute path)</description>
2139      <test-commands>
2140        <command>-fs NAMENODE -get /user/file CLITEST_DATA/file</command>
2141      </test-commands>
2142      <cleanup-commands>
2143        <command>-fs NAMENODE -rmr /user</command>
2144      </cleanup-commands>
2145      <comparators>
2146        <comparator>
2147          <type>TokenComparator</type>
2148          <expected-output>get: null</expected-output>
2149        </comparator>
2150      </comparators>
2151    </test>
2152   
2153    <test> <!-- TESTED -->
2154      <description>get: getting non existent file(relative path)</description>
2155      <test-commands>
2156        <command>-fs NAMENODE -get file CLITEST_DATA/file</command>
2157      </test-commands>
2158      <cleanup-commands>
2159        <command>-fs NAMENODE -rmr /user</command>
2160      </cleanup-commands>
2161      <comparators>
2162        <comparator>
2163          <type>TokenComparator</type>
2164          <expected-output>get: null</expected-output>
2165        </comparator>
2166      </comparators>
2167    </test>
2168   
2169    <!-- Tests for getmerge -->
2170    <!-- Manual Testing -->
2171
2172    <!-- Tests for cat -->
2173    <test> <!-- TESTED -->
2174      <description>cat: contents of file(absolute path)</description>
2175      <test-commands>
2176        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
2177        <command>-fs NAMENODE -cat /data15bytes</command>
2178      </test-commands>
2179      <cleanup-commands>
2180        <command>-fs NAMENODE -rm /data15bytes</command>
2181      </cleanup-commands>
2182      <comparators>
2183        <comparator>
2184          <type>TokenComparator</type>
2185          <expected-output>12345678901234</expected-output>
2186        </comparator>
2187      </comparators>
2188    </test>
2189   
2190    <test>
2191      <description>cat: contents of file(relative path)</description>
2192      <test-commands>
2193        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
2194        <command>-fs NAMENODE -cat data15bytes</command>
2195      </test-commands>
2196      <cleanup-commands>
2197        <command>-fs NAMENODE -rmr  /user</command>
2198      </cleanup-commands>
2199      <comparators>
2200        <comparator>
2201          <type>TokenComparator</type>
2202          <expected-output>12345678901234</expected-output>
2203        </comparator>
2204      </comparators>
2205    </test>
2206   
2207    <test>  <!-- TESTED -->
2208      <description>cat: contents of files(absolute path) using globbing</description>
2209      <test-commands>
2210        <command>-fs NAMENODE -mkdir /dir0</command>
2211        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
2212        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
2213        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
2214        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
2215        <command>-fs NAMENODE -cat /dir0/data*</command>
2216      </test-commands>
2217      <cleanup-commands>
2218        <command>-fs NAMENODE -rmr /dir0</command>
2219      </cleanup-commands>
2220      <comparators>
2221        <comparator>
2222          <type>RegexpComparator</type>
2223          <expected-output>12345678901234.*</expected-output>
2224        </comparator>
2225      </comparators>
2226    </test>
2227   
2228    <test> <!-- TESTED-->
2229      <description>cat: contents of files(relative path) using globbing</description>
2230      <test-commands>
2231        <command>-fs NAMENODE -mkdir dir0</command>
2232        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
2233        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
2234        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
2235        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
2236        <command>-fs NAMENODE -cat dir0/data*</command>
2237      </test-commands>
2238      <cleanup-commands>
2239        <command>-fs NAMENODE -rmr /user</command>
2240      </cleanup-commands>
2241      <comparators>
2242        <comparator>
2243          <type>RegexpComparator</type>
2244          <expected-output>12345678901234.*</expected-output>
2245        </comparator>
2246      </comparators>
2247    </test>
2248   
2249    <test>  <!-- TESTED -->
2250      <description>cat: contents of files(absolute path) without globbing</description>
2251      <test-commands>
2252        <command>-fs NAMENODE -mkdir /dir0</command>
2253        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
2254        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
2255        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
2256        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
2257        <command>-fs NAMENODE -cat /dir0/data15bytes /dir0/data30bytes /dir0/data60bytes /dir0/data120bytes</command>
2258      </test-commands>
2259      <cleanup-commands>
2260        <command>-fs NAMENODE -rmr /dir0</command>
2261      </cleanup-commands>
2262      <comparators>
2263        <comparator>
2264          <type>RegexpComparator</type>
2265          <expected-output>12345678901234.*</expected-output>
2266        </comparator>
2267      </comparators>
2268    </test>
2269   
2270    <test> <!-- TESTED-->
2271      <description>cat: contents of files(relative path) without globbing</description>
2272      <test-commands>
2273        <command>-fs NAMENODE -mkdir dir0</command>
2274        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes dir0/data15bytes</command>
2275        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes dir0/data30bytes</command>
2276        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes dir0/data60bytes</command>
2277        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes dir0/data120bytes</command>
2278        <command>-fs NAMENODE -cat dir0/data15bytes dir0/data30bytes dir0/data60bytes dir0/data120bytes</command>
2279      </test-commands>
2280      <cleanup-commands>
2281        <command>-fs NAMENODE -rmr /user</command>
2282      </cleanup-commands>
2283      <comparators>
2284        <comparator>
2285          <type>RegexpComparator</type>
2286          <expected-output>12345678901234.*</expected-output>
2287        </comparator>
2288      </comparators>
2289    </test>
2290   
2291   
2292    <test> <!-- TESTED -->
2293      <description>cat: contents of file(absolute path) that does not exist</description>
2294      <test-commands>
2295        <command>-fs NAMENODE -cat /file</command>
2296      </test-commands>
2297      <cleanup-commands>
2298      </cleanup-commands>
2299      <comparators>
2300        <comparator>
2301          <type>RegexpComparator</type>
2302          <expected-output>^cat: File does not exist: /file</expected-output>
2303        </comparator>
2304      </comparators>
2305    </test>
2306   
2307    <test> <!-- TESTED -->
2308      <description>cat: contents of file(relative path) that does not exist</description>
2309      <test-commands>
2310        <command>-fs NAMENODE -cat file</command>
2311      </test-commands>
2312      <cleanup-commands>
2313      </cleanup-commands>
2314      <comparators>
2315        <comparator>
2316          <type>RegexpComparator</type>
2317          <expected-output>^cat: File does not exist: file</expected-output>
2318        </comparator>
2319      </comparators>
2320    </test>
2321   
2322    <test> <!-- TESTED -->
2323      <description>cat: contents of directory(absolute path)</description>
2324      <test-commands>
2325        <command>-fs NAMENODE -mkdir /dir1</command>
2326        <command>-fs NAMENODE -cat /dir1</command>
2327      </test-commands>
2328      <cleanup-commands>
2329        <command>-fs NAMENODE -rmr /dir1</command>
2330      </cleanup-commands>
2331      <comparators>
2332        <comparator>
2333          <type>RegexpComparator</type>
2334          <expected-output>^cat: Source must be a file.</expected-output>
2335        </comparator>
2336      </comparators>
2337    </test>
2338   
2339    <test> <!-- TESTED -->
2340      <description>cat: contents of directory(relative path)</description>
2341      <test-commands>
2342        <command>-fs NAMENODE -mkdir dir1</command>
2343        <command>-fs NAMENODE -cat dir</command>
2344      </test-commands>
2345      <cleanup-commands>
2346        <command>-fs NAMENODE -rmr dir1</command>
2347      </cleanup-commands>
2348      <comparators>
2349        <comparator>
2350          <type>RegexpComparator</type>
2351          <expected-output>^cat: File does not exist: dir</expected-output>
2352        </comparator>
2353      </comparators>
2354    </test>
2355   
2356    <!-- Tests for copyToLocal -->
2357    <test> <!-- TESTED -->
2358      <description>copyToLocal: non existent relative path</description>
2359      <test-commands>
2360        <command>-fs NAMENODE -copyToLocal file CLITEST_DATA/file</command>
2361      </test-commands>
2362      <cleanup-commands>
2363        <command>-fs NAMENODE -rmr /user</command>
2364      </cleanup-commands>
2365      <comparators>
2366        <comparator>
2367          <type>TokenComparator</type>
2368          <expected-output>copyToLocal: null</expected-output>
2369        </comparator>
2370      </comparators>
2371    </test>
2372   
2373    <test> <!-- TESTED -->
2374      <description>copyToLocal: non existent absolute path</description>
2375      <test-commands>
2376        <command>-fs NAMENODE -copyToLocal /user/file CLITEST_DATA/file</command>
2377      </test-commands>
2378      <cleanup-commands>
2379        <command>-fs NAMENODE -rmr /user</command>
2380      </cleanup-commands>
2381      <comparators>
2382        <comparator>
2383          <type>TokenComparator</type>
2384          <expected-output>copyToLocal: null</expected-output>
2385        </comparator>
2386      </comparators>
2387    </test>
2388   
2389    <!-- Tests for moveToLocal -->
2390    <!-- Not yet implemented -->
2391
2392    <!-- Tests for mkdir -->
2393    <test> <!-- TESTED -->
2394      <description>mkdir: creating directory (absolute path) </description>
2395      <test-commands>
2396        <command>-fs NAMENODE -mkdir /dir0</command>
2397        <command>-fs NAMENODE -dus /dir0</command>
2398      </test-commands>
2399      <cleanup-commands>
2400        <command>-fs NAMENODE -rm /user</command>
2401      </cleanup-commands>
2402      <comparators>
2403        <comparator>
2404          <type>RegexpComparator</type>
2405          <expected-output>^hdfs://localhost[.a-z]*:[0-9]*/dir0(|\t)*0</expected-output>
2406        </comparator>
2407      </comparators>
2408    </test>
2409   
2410    <test> <!-- TESTED -->
2411      <description>mkdir: creating directory (relative path) </description>
2412      <test-commands>
2413        <command>-fs NAMENODE -mkdir dir0 </command>
2414        <command>-fs NAMENODE -dus dir0</command>
2415      </test-commands>
2416      <cleanup-commands>
2417        <command>-fs NAMENODE -rm /user</command>
2418      </cleanup-commands>
2419      <comparators>
2420        <comparator>
2421          <type>RegexpComparator</type>
2422          <expected-output>^hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0(|\t)*0</expected-output>
2423        </comparator>
2424      </comparators>
2425    </test>
2426   
2427    <test> <!-- TESTED -->
2428      <description>mkdir: creating many directories (absolute path) </description>
2429      <test-commands>
2430        <command>-fs NAMENODE -mkdir /dir0 </command>
2431        <command>-fs NAMENODE -mkdir /dir1 </command>       
2432        <command>-fs NAMENODE -mkdir /dir2 </command>
2433        <command>-fs NAMENODE -mkdir /dir3 </command>
2434        <command>-fs NAMENODE -dus /dir*</command>
2435      </test-commands>
2436      <cleanup-commands>
2437        <command>-fs NAMENODE -rm /dir*</command>
2438      </cleanup-commands>
2439      <comparators>
2440        <comparator>
2441          <type>RegexpComparator</type>
2442          <expected-output>^hdfs://localhost[.a-z]*:[0-9]*/dir0(|\t)*0</expected-output>
2443        </comparator>
2444        <comparator>
2445          <type>RegexpComparator</type>
2446          <expected-output>^hdfs://localhost[.a-z]*:[0-9]*/dir1(|\t)*0</expected-output>
2447        </comparator>
2448        <comparator>
2449          <type>RegexpComparator</type>
2450          <expected-output>^hdfs://localhost[.a-z]*:[0-9]*/dir2(|\t)*0</expected-output>
2451        </comparator>
2452        <comparator>
2453          <type>RegexpComparator</type>
2454          <expected-output>^hdfs://localhost[.a-z]*:[0-9]*/dir3(|\t)*0</expected-output>
2455        </comparator>
2456      </comparators>
2457    </test>
2458   
2459    <test> <!-- TESTED -->
2460      <description>mkdir: creating many directories (relative path) </description>
2461      <test-commands>
2462        <command>-fs NAMENODE -mkdir dir0 </command>
2463        <command>-fs NAMENODE -mkdir dir1 </command>
2464        <command>-fs NAMENODE -mkdir dir2 </command>
2465        <command>-fs NAMENODE -mkdir dir3 </command>
2466        <command>-fs NAMENODE -dus dir*</command>
2467      </test-commands>
2468      <cleanup-commands>
2469        <command>-fs NAMENODE -rm /user</command>
2470      </cleanup-commands>
2471      <comparators>
2472        <comparator>
2473          <type>RegexpComparator</type>
2474          <expected-output>^hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0(|\t)*0</expected-output>
2475        </comparator>
2476        <comparator>
2477          <type>RegexpComparator</type>
2478          <expected-output>^hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir1(|\t)*0</expected-output>
2479        </comparator>
2480        <comparator>
2481          <type>RegexpComparator</type>
2482          <expected-output>^hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir2(|\t)*0</expected-output>
2483        </comparator>
2484        <comparator>
2485          <type>RegexpComparator</type>
2486          <expected-output>^hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir3(|\t)*0</expected-output>
2487        </comparator>
2488      </comparators>
2489    </test>
2490   
2491    <test> <!-- TESTED -->
2492      <description>mkdir: creating a directory with the name of an already existing directory</description>
2493      <test-commands>
2494        <command>-fs NAMENODE -mkdir /dir0</command>
2495        <command>-fs NAMENODE -mkdir /dir0</command>
2496      </test-commands>
2497      <cleanup-commands>
2498        <command>-fs NAMENODE -rmr /dir0</command>
2499      </cleanup-commands>
2500      <comparators>
2501        <comparator>
2502          <type>TokenComparator</type>
2503          <expected-output>mkdir: cannot create directory /dir0: File exists</expected-output>
2504        </comparator>
2505      </comparators>
2506    </test>
2507   
2508    <test> <!-- TESTED -->
2509      <description>mkdir: creating a directory with the name of an already existing file</description>
2510      <test-commands>
2511        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
2512        <command>-fs NAMENODE -mkdir data15bytes</command>
2513      </test-commands>
2514      <cleanup-commands>
2515        <command>-fs NAMENODE -rmr data15bytes</command>
2516      </cleanup-commands>
2517      <comparators>
2518        <comparator>
2519          <type>TokenComparator</type>
2520          <expected-output>mkdir: data15bytes exists but is not a directory</expected-output>
2521        </comparator>
2522      </comparators>
2523    </test>
2524   
2525    <!--Tests for setrep-->
2526    <test> <!-- TESTED -->
2527      <description>setrep: existent file (absolute path)</description>
2528      <test-commands>
2529        <command>-fs NAMENODE -touchz /dir0/file0</command>
2530        <command>-fs NAMENODE -setrep 2 /dir0/file0</command>
2531      </test-commands>
2532      <cleanup-commands>
2533        <command>-fs NAMENODE -rmr /user</command>
2534      </cleanup-commands>
2535      <comparators>
2536        <comparator>
2537          <type>RegexpComparator</type>
2538          <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output>
2539        </comparator>
2540      </comparators>
2541    </test>
2542   
2543    <test> <!-- TESTED -->
2544      <description>setrep: existent file (relative path)</description>
2545      <test-commands>
2546        <command>-fs NAMENODE -touchz file0</command>
2547        <command>-fs NAMENODE -setrep 2 file0</command>
2548      </test-commands>
2549      <cleanup-commands>
2550        <command>-fs NAMENODE -rmr /user</command>
2551      </cleanup-commands>
2552      <comparators>
2553        <comparator>
2554          <type>RegexpComparator</type>
2555          <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output>
2556        </comparator>
2557      </comparators>
2558    </test>
2559   
2560    <test> <!-- TESTED -->
2561      <description>setrep: existent directory (absolute path)</description>
2562      <test-commands>
2563        <command>-fs NAMENODE -touchz /dir0/file0</command>
2564        <command>-fs NAMENODE -touchz /dir0/file1</command>
2565        <command>-fs NAMENODE -setrep -R 2 /dir0</command>
2566      </test-commands>
2567      <cleanup-commands>
2568        <command>-fs NAMENODE -rmr /user</command>
2569      </cleanup-commands>
2570      <comparators>
2571        <comparator>
2572          <type>RegexpComparator</type>
2573          <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/dir0/file0</expected-output>
2574        </comparator>
2575        <comparator>
2576          <type>RegexpComparator</type>
2577          <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/dir0/file1</expected-output>
2578        </comparator>
2579      </comparators>
2580    </test>
2581   
2582    <test> <!-- TESTED -->
2583      <description>setrep: existent directory (relative path)</description>
2584      <test-commands>
2585        <command>-fs NAMENODE -touchz dir0/file0</command>
2586        <command>-fs NAMENODE -touchz dir0/file1</command>
2587        <command>-fs NAMENODE -setrep -R 2 dir0</command>
2588      </test-commands>
2589      <cleanup-commands>
2590        <command>-fs NAMENODE -rmr /user</command>
2591      </cleanup-commands>
2592      <comparators>
2593        <comparator>
2594          <type>RegexpComparator</type>
2595          <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/file0</expected-output>
2596        </comparator>
2597        <comparator>
2598          <type>RegexpComparator</type>
2599          <expected-output>^Replication 2 set: hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/dir0/file1</expected-output>
2600        </comparator>
2601      </comparators>
2602    </test>
2603   
2604    <test> <!-- TESTED -->
2605      <description>setrep: non existent file (absolute path)</description>
2606      <test-commands>
2607        <command>-fs NAMENODE -setrep 2 /dir0/file</command>
2608      </test-commands>
2609      <cleanup-commands>
2610        <command>-fs NAMENODE -rmr /user</command>
2611      </cleanup-commands>
2612      <comparators>
2613        <comparator>
2614          <type>RegexpComparator</type>
2615          <expected-output>^setrep: File does not exist: /dir0/file</expected-output>
2616        </comparator>
2617      </comparators>
2618    </test>
2619   
2620    <test> <!-- TESTED -->
2621      <description>setrep: non existent file (relative path)</description>
2622      <test-commands>
2623        <command>-fs NAMENODE -setrep 2 file0</command>
2624      </test-commands>
2625      <cleanup-commands>
2626        <command>-fs NAMENODE -rmr /user</command>
2627      </cleanup-commands>
2628      <comparators>
2629        <comparator>
2630          <type>RegexpComparator</type>
2631          <expected-output>^setrep: File does not exist: file0</expected-output>
2632        </comparator>
2633      </comparators>
2634    </test>
2635   
2636   
2637    <!-- Tests for touchz-->
2638    <test> <!-- TESTED -->
2639      <description>touchz: touching file (absolute path) </description>
2640      <test-commands>
2641        <command>-fs NAMENODE -touchz /user/file0</command>
2642        <command>-fs NAMENODE -du /user/file0</command>
2643      </test-commands>
2644      <cleanup-commands>
2645        <command>-fs NAMENODE -rm /user</command>
2646      </cleanup-commands>
2647      <comparators>
2648        <comparator>
2649          <type>TokenComparator</type>
2650          <expected-output>Found 1 items</expected-output>
2651        </comparator>
2652        <comparator>
2653          <type>RegexpComparator</type>
2654          <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/file0</expected-output>
2655        </comparator>
2656      </comparators>
2657    </test>
2658   
2659    <test> <!-- TESTED -->
2660      <description>touchz: touching file(relative path) </description>
2661      <test-commands>
2662        <command>-fs NAMENODE -touchz file0 </command>
2663        <command>-fs NAMENODE -du file0</command>
2664      </test-commands>
2665      <cleanup-commands>
2666        <command>-fs NAMENODE -rm /user</command>
2667      </cleanup-commands>
2668      <comparators>
2669        <comparator>
2670          <type>TokenComparator</type>
2671          <expected-output>Found 1 items</expected-output>
2672        </comparator>
2673        <comparator>
2674          <type>RegexpComparator</type>
2675          <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output>
2676        </comparator>
2677      </comparators>
2678    </test>
2679   
2680    <test> <!-- TESTED -->
2681      <description>touchz: touching many files </description>
2682      <test-commands>
2683        <command>-fs NAMENODE -touchz file0 file1 file2</command>
2684        <command>-fs NAMENODE -du file*</command>
2685      </test-commands>
2686      <cleanup-commands>
2687        <command>-fs NAMENODE -rm /user</command>
2688      </cleanup-commands>
2689      <comparators>
2690        <comparator>
2691          <type>TokenComparator</type>
2692          <expected-output>Found 3 items</expected-output>
2693        </comparator>
2694        <comparator>
2695          <type>RegexpComparator</type>
2696          <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file0</expected-output>
2697          <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file1</expected-output>
2698          <expected-output>^0( |\t)*hdfs://localhost[.a-z]*:[0-9]*/user/[a-z]*/file2</expected-output>
2699        </comparator>
2700      </comparators>
2701    </test>
2702   
2703    <test> <!-- TESTED -->
2704      <description>touchz: touching already existing file </description>
2705      <test-commands>
2706        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
2707        <command>-fs NAMENODE -touchz data15bytes</command>
2708      </test-commands>
2709      <cleanup-commands>
2710        <command>-fs NAMENODE -rm data15bytes</command>
2711      </cleanup-commands>
2712      <comparators>
2713        <comparator>
2714          <type>TokenComparator</type>
2715          <expected-output>touchz: data15bytes must be a zero-length file</expected-output>
2716        </comparator>
2717      </comparators>
2718    </test>
2719   
2720    <!--Tests for test-->
2721    <test> <!-- TESTED -->
2722      <description>test: non existent file (absolute path)</description>
2723      <test-commands>
2724        <command>-fs NAMENODE -test -z /dir0/file</command>
2725      </test-commands>
2726      <cleanup-commands>
2727        <command>-fs NAMENODE -rmr /user</command>
2728      </cleanup-commands>
2729      <comparators>
2730        <comparator>
2731          <type>RegexpComparator</type>
2732          <expected-output>^test: File does not exist: /dir0/file</expected-output>
2733        </comparator>
2734      </comparators>
2735    </test>
2736   
2737    <test> <!-- TESTED -->
2738      <description>test: non existent file (relative path)</description>
2739      <test-commands>
2740        <command>-fs NAMENODE -test -z file</command>
2741      </test-commands>
2742      <cleanup-commands>
2743        <command>-fs NAMENODE -rmr /user</command>
2744      </cleanup-commands>
2745      <comparators>
2746        <comparator>
2747          <type>RegexpComparator</type>
2748          <expected-output>^test: File does not exist: file</expected-output>
2749        </comparator>
2750      </comparators>
2751    </test>
2752   
2753    <test> <!-- TESTED -->
2754      <description>test: non existent directory (absolute path)</description>
2755      <test-commands>
2756        <command>-fs NAMENODE -test -d /dir</command>
2757      </test-commands>
2758      <cleanup-commands>
2759        <command>-fs NAMENODE -rmr /user</command>
2760      </cleanup-commands>
2761      <comparators>
2762        <comparator>
2763          <type>RegexpComparator</type>
2764          <expected-output>^test: File does not exist: /dir</expected-output>
2765        </comparator>
2766      </comparators>
2767    </test>
2768   
2769    <test> <!-- TESTED -->
2770      <description>test: non existent directory (relative path)</description>
2771      <test-commands>
2772        <command>-fs NAMENODE -test -d dir0</command>
2773      </test-commands>
2774      <cleanup-commands>
2775        <command>-fs NAMENODE -rmr /user</command>
2776      </cleanup-commands>
2777      <comparators>
2778        <comparator>
2779          <type>RegexpComparator</type>
2780          <expected-output>^test: File does not exist: dir0</expected-output>
2781        </comparator>
2782      </comparators>
2783    </test>
2784   
2785    <!--Tests for stat -->
2786    <test> <!-- TESTED -->
2787      <description>stat: statistics about file(absolute path)</description>
2788      <test-commands>
2789        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /data60bytes</command>
2790        <command>-fs NAMENODE -stat "%n-%b" /data60bytes</command>
2791      </test-commands>
2792      <cleanup-commands>
2793        <command>-fs NAMENODE -rmr /data60bytes</command>
2794      </cleanup-commands>
2795      <comparators>
2796        <comparator>
2797          <type>TokenComparator</type>
2798          <expected-output>data60bytes-60</expected-output>
2799        </comparator>
2800      </comparators>
2801    </test>
2802   
2803    <test> <!-- TESTED -->
2804      <description>stat: statistics about file(relative path)</description>
2805      <test-commands>
2806        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
2807        <command>-fs NAMENODE -stat "%n-%b" data60bytes</command>
2808      </test-commands>
2809      <cleanup-commands>
2810        <command>-fs NAMENODE -rmr /user</command>
2811      </cleanup-commands>
2812      <comparators>
2813        <comparator>
2814          <type>TokenComparator</type>
2815          <expected-output>data60bytes-60</expected-output>
2816        </comparator>
2817      </comparators>
2818    </test>
2819   
2820    <test> <!-- TESTED -->
2821      <description>stat: statistics about directory(absolute path)</description>
2822      <test-commands>
2823        <command>-fs NAMENODE -mkdir /dirtest</command>
2824        <command>-fs NAMENODE -stat "%n-%b-%o" /dirtest</command>
2825      </test-commands>
2826      <cleanup-commands>
2827        <command>-fs NAMENODE -rmr /dirtest</command>
2828      </cleanup-commands>
2829      <comparators>
2830        <comparator>
2831          <type>TokenComparator</type>
2832          <expected-output>dirtest-0-0</expected-output>
2833        </comparator>
2834      </comparators>
2835    </test>
2836   
2837    <test> <!-- TESTED -->
2838      <description>stat: statistics about directory(relative path)</description>
2839      <test-commands>
2840        <command>-fs NAMENODE -mkdir dirtest</command>
2841        <command>-fs NAMENODE -stat "%n-%b-%o" dirtest</command>
2842      </test-commands>
2843      <cleanup-commands>
2844        <command>-fs NAMENODE -rmr /user</command>
2845      </cleanup-commands>
2846      <comparators>
2847        <comparator>
2848          <type>TokenComparator</type>
2849          <expected-output>dirtest-0-0</expected-output>
2850        </comparator>
2851      </comparators>
2852    </test>
2853   
2854    <test> <!-- TESTED -->
2855      <description>stat: statistics about files (absolute path) using globbing</description>
2856      <test-commands>
2857        <command>-fs -mkdir /dir0</command>
2858        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /dir0/data15bytes</command>
2859        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes /dir0/data30bytes</command>
2860        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes /dir0/data60bytes</command>
2861        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes /dir0/data120bytes</command>
2862        <command>-fs NAMENODE -mkdir /dir0/datadir</command>
2863        <command>-fs NAMENODE -stat "%n-%b" /dir0/data*</command>
2864      </test-commands>
2865      <cleanup-commands>
2866        <command>-fs NAMENODE -rmr /dir0</command>
2867      </cleanup-commands>
2868      <comparators>
2869        <comparator>
2870          <type>TokenComparator</type>
2871          <expected-output>"data15bytes-15"</expected-output>
2872        </comparator>
2873        <comparator>
2874          <type>TokenComparator</type>
2875          <expected-output>"data30bytes-30"</expected-output>
2876        </comparator>
2877        <comparator>
2878          <type>TokenComparator</type>
2879          <expected-output>"data60bytes-60"</expected-output>
2880        </comparator>
2881        <comparator>
2882          <type>TokenComparator</type>
2883          <expected-output>"data120bytes-120"</expected-output>
2884        </comparator>
2885        <comparator>
2886          <type>TokenComparator</type>
2887          <expected-output>"datadir-0"</expected-output>
2888        </comparator>
2889      </comparators>
2890    </test>
2891   
2892    <test> <!-- TESTED -->
2893      <description>stat: statistics about files (relative path) using globbing</description>
2894      <test-commands>
2895        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
2896        <command>-fs NAMENODE -put CLITEST_DATA/data30bytes data30bytes</command>
2897        <command>-fs NAMENODE -put CLITEST_DATA/data60bytes data60bytes</command>
2898        <command>-fs NAMENODE -put CLITEST_DATA/data120bytes data120bytes</command>
2899        <command>-fs NAMENODE -mkdir datadir</command>
2900        <command>-fs NAMENODE -stat "%n-%b" data*</command>
2901      </test-commands>
2902      <cleanup-commands>
2903        <command>-fs NAMENODE -rmr /user</command>
2904      </cleanup-commands>
2905      <comparators>
2906        <comparator>
2907          <type>TokenComparator</type>
2908          <expected-output>"data15bytes-15"</expected-output>
2909        </comparator>
2910        <comparator>
2911          <type>TokenComparator</type>
2912          <expected-output>"data30bytes-30"</expected-output>
2913        </comparator>
2914        <comparator>
2915          <type>TokenComparator</type>
2916          <expected-output>"data60bytes-60"</expected-output>
2917        </comparator>
2918        <comparator>
2919          <type>TokenComparator</type>
2920          <expected-output>"data120bytes-120"</expected-output>
2921        </comparator>
2922        <comparator>
2923          <type>TokenComparator</type>
2924          <expected-output>"datadir-0"</expected-output>
2925        </comparator>
2926      </comparators>
2927    </test>
2928   
2929    <test> <!-- TESTED -->
2930      <description>stat: statistics about file or directory(absolute path) that does not exist</description>
2931      <test-commands>
2932        <command>-fs NAMENODE -stat /file</command>
2933      </test-commands>
2934      <cleanup-commands>
2935      </cleanup-commands>
2936      <comparators>
2937        <comparator>
2938          <type>RegexpComparator</type>
2939          <expected-output>^stat: cannot stat `/file': No such file or directory</expected-output>
2940        </comparator>
2941      </comparators>
2942    </test>
2943   
2944    <test> <!-- TESTED -->
2945      <description>stat: statistics about file or directory(relative path) that does not exist </description>
2946      <test-commands>
2947        <command>-fs NAMENODE -stat file1</command>
2948      </test-commands>
2949      <cleanup-commands>
2950      </cleanup-commands>
2951      <comparators>
2952        <comparator>
2953          <type>RegexpComparator</type>
2954          <expected-output>^stat: cannot stat `file1': No such file or directory</expected-output>
2955        </comparator>
2956      </comparators>
2957    </test>
2958   
2959   
2960    <!-- Tests for tail -->
2961    <test> <!-- TESTED -->
2962      <description>tail: contents of file(absolute path)</description>
2963      <test-commands>
2964        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes /data15bytes</command>
2965        <command>-fs NAMENODE -tail /data15bytes</command>
2966      </test-commands>
2967      <cleanup-commands>
2968        <command>-fs NAMENODE -rm /user</command>
2969      </cleanup-commands>
2970      <comparators>
2971        <comparator>
2972          <type>TokenComparator</type>
2973          <expected-output>12345678901234</expected-output>
2974        </comparator>
2975      </comparators>
2976    </test>
2977   
2978    <test> <!--TESTED-->
2979      <description>tail: contents of file(relative path)</description>
2980      <test-commands>
2981        <command>-fs NAMENODE -put CLITEST_DATA/data15bytes data15bytes</command>
2982        <command>-fs NAMENODE -tail data15bytes</command>
2983      </test-commands>
2984      <cleanup-commands>
2985        <command>-fs NAMENODE -rmr  /user</command>
2986      </cleanup-commands>
2987      <comparators>
2988        <comparator>
2989          <type>TokenComparator</type>
2990          <expected-output>12345678901234</expected-output>
2991        </comparator>
2992      </comparators>
2993    </test>
2994   
2995    <test> <!-- TESTED -->
2996      <description>tail: contents of files(absolute path) using globbing</description>
2997      <test-commands>
2998        <command>-fs NAMENODE -touchz /file1</command>
2999        <command>-fs NAMENODE -touchz /file2</command>
3000        <command>-fs NAMENODE -touchz /file3</command>
3001        <command>-fs NAMENODE -touchz /file4</command>
3002        <command>-fs NAMENODE -tail /file*</command>
3003      </test-commands>
3004      <cleanup-commands>
3005        <command>-fs NAMENODE -rmr /user</command>
3006      </cleanup-commands>
3007      <comparators>
3008        <comparator>
3009          <type>RegexpComparator</type>
3010          <expected-output>^tail: File does not exist: /file\*</expected-output>
3011        </comparator>
3012      </comparators>
3013    </test>
3014   
3015    <test> <!-- TESTED -->
3016      <description>tail: contents of files(relative path) using globbing</description>
3017      <test-commands>
3018        <command>-fs NAMENODE -touchz file1</command>
3019        <command>-fs NAMENODE -touchz file2</command>
3020        <command>-fs NAMENODE -touchz file3</command>
3021        <command>-fs NAMENODE -touchz file4</command>
3022        <command>-fs NAMENODE -tail file*</command>
3023      </test-commands>
3024      <cleanup-commands>
3025        <command>-fs NAMENODE -rmr /user</command>
3026      </cleanup-commands>
3027      <comparators>
3028        <comparator>
3029          <type>RegexpComparator</type>
3030          <expected-output>^tail: File does not exist: file\*</expected-output>
3031        </comparator>
3032      </comparators>
3033    </test>
3034   
3035    <test> <!-- TESTED -->
3036      <description>tail: contents of file(absolute path) that does not exist</description>
3037      <test-commands>
3038        <command>-fs NAMENODE -tail /file</command>
3039      </test-commands>
3040      <cleanup-commands>
3041      </cleanup-commands>
3042      <comparators>
3043        <comparator>
3044          <type>RegexpComparator</type>
3045          <expected-output>^tail: File does not exist: /file</expected-output>
3046        </comparator>
3047      </comparators>
3048    </test>
3049   
3050    <test> <!-- TESTED -->
3051      <description>tail: contents of file(relative path) that does not exist</description>
3052      <test-commands>
3053        <command>-fs NAMENODE -tail file1</command>
3054      </test-commands>
3055      <cleanup-commands>
3056      </cleanup-commands>
3057      <comparators>
3058        <comparator>
3059          <type>RegexpComparator</type>
3060          <expected-output>^tail: File does not exist: file1</expected-output>
3061        </comparator>
3062      </comparators>
3063    </test>
3064   
3065    <test> <!-- TESTED -->
3066      <description>tail: contents of directory(absolute path) </description>
3067      <test-commands>
3068        <command>-fs NAMENODE -mkdir /dir1</command>
3069        <command>-fs NAMENODE -tail /dir1</command>
3070      </test-commands>
3071      <cleanup-commands>
3072        <command>-fs NAMENODE -rmr /dir1</command>
3073      </cleanup-commands>
3074      <comparators>
3075        <comparator>
3076          <type>RegexpComparator</type>
3077          <expected-output>^tail: Source must be a file.</expected-output>
3078        </comparator>
3079      </comparators>
3080    </test>
3081   
3082    <test> <!-- TESTED -->
3083      <description>tail: contents of directory(relative path)</description>
3084      <test-commands>
3085        <command>-fs NAMENODE -mkdir dir1</command>
3086        <command>-fs NAMENODE -tail dir1</command>
3087      </test-commands>
3088      <cleanup-commands>
3089        <command>-fs NAMENODE -rmr dir1</command>
3090      </cleanup-commands>
3091      <comparators>
3092        <comparator>
3093          <type>RegexpComparator</type>
3094          <expected-output>^tail: Source must be a file.</expected-output>
3095        </comparator>
3096      </comparators>
3097    </test>
3098   
3099    <!-- Tests for moveFromLocal -->
3100    <test> <!-- TESTED -->
3101      <description>moveFromLocal: moving non existent file(absolute path)</description>
3102      <test-commands>
3103        <command>-fs NAMENODE -moveFromLocal /user/wrongdata file</command>
3104      </test-commands>
3105      <cleanup-commands>
3106        <command>-fs NAMENODE -rmr /user</command>
3107      </cleanup-commands>
3108      <comparators>
3109        <comparator>
3110          <type>TokenComparator</type>
3111          <expected-output>moveFromLocal: File /user/wrongdata does not exist</expected-output>
3112        </comparator>
3113      </comparators>
3114    </test>
3115   
3116    <test> <!-- TESTED -->
3117      <description>moveFromLocal: moving non existent file(relative path)</description>
3118      <test-commands>
3119        <command>-fs NAMENODE -moveFromLocal wrongdata file</command>
3120      </test-commands>
3121      <cleanup-commands>
3122        <command>-fs NAMENODE -rmr /user</command>
3123      </cleanup-commands>
3124      <comparators>
3125        <comparator>
3126          <type>TokenComparator</type>
3127          <expected-output>moveFromLocal: File wrongdata does not exist</expected-output>
3128        </comparator>
3129      </comparators>
3130    </test>
3131   
3132    <test> <!-- TESTED -->
3133      <description>moveFromLocal: moving many files into an existing file</description>
3134      <test-commands>
3135        <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
3136        <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
3137        <command>-fs NAMENODE -touchz file0</command>
3138        <command>-fs NAMENODE -moveFromLocal /data15bytes /data30bytes file0</command>
3139      </test-commands>
3140      <cleanup-commands>
3141        <command>-fs NAMENODE -rmr /user</command>
3142      </cleanup-commands>
3143      <comparators>
3144        <comparator>
3145          <type>RegexpComparator</type>
3146          <expected-output>^moveFromLocal: copying multiple files, but last argument `file0' is not a directory</expected-output>
3147        </comparator>
3148      </comparators>
3149    </test>
3150   
3151    <test> <!-- TESTED -->
3152      <description>moveFromLocal: moving many files into a non existent directory</description>
3153      <test-commands>
3154        <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data15bytes /data15bytes</command>
3155        <command>-fs NAMENODE -moveFromLocal CLITEST_DATA/data30bytes /data30bytes</command>
3156        <command>-fs NAMENODE -moveFromLocal /data15bytes /data30bytes wrongdir</command>
3157      </test-commands>
3158      <cleanup-commands>
3159        <command>-fs NAMENODE -rmr /user</command>
3160      </cleanup-commands>
3161      <comparators>
3162        <comparator>
3163          <type>RegexpComparator</type>
3164          <expected-output>^moveFromLocal: `wrongdir': specified destination directory doest not exist</expected-output>
3165        </comparator>
3166      </comparators>
3167    </test>
3168   
3169    <test> <!--Tested -->
3170      <description>verifying error messages for quota commands - setting quota on a file</description>
3171      <test-commands>
3172        <command>-fs NAMENODE -mkdir /test </command>
3173        <command>-fs NAMENODE -touchz /test/file1 </command>
3174        <dfs-admin-command>-fs NAMENODE -setQuota 1 /test/file1 </dfs-admin-command>
3175      </test-commands>
3176      <cleanup-commands>
3177        <dfs-admin-command>-fs NAMENODE -setQuota 5 /test </dfs-admin-command>
3178        <!-- Same directory will be used in the next test -->
3179      </cleanup-commands>
3180      <comparators>
3181        <comparator>
3182          <type>SubstringComparator</type>
3183          <expected-output>Cannot set quota on a file: /test/file1</expected-output>
3184        </comparator>
3185      </comparators>
3186    </test>
3187   
3188    <test> <!--Tested -->
3189      <description>verifying error messages for quota commands - setting quota on non-existing file</description>
3190      <test-commands>
3191        <dfs-admin-command>-fs NAMENODE -setSpaceQuota 1g /test1 </dfs-admin-command>
3192      </test-commands>
3193      <cleanup-commands>
3194             <!-- Same directory will be used in the next test -->   
3195      </cleanup-commands>
3196      <comparators>
3197        <comparator>
3198          <type>SubstringComparator</type>
3199          <expected-output>Can not find listing for /test1</expected-output>
3200        </comparator>
3201      </comparators>
3202    </test>
3203   
3204    <test> <!--Tested -->
3205      <description>verifying error messages for quota commands - exceeding quota</description>
3206      <test-commands>
3207        <dfs-admin-command>-fs NAMENODE -setQuota 3 /test </dfs-admin-command>
3208        <command>-fs NAMENODE -touchz /test/file0 </command>
3209        <command>-fs NAMENODE -mkdir /test/test1 </command>
3210      </test-commands>
3211      <cleanup-commands>
3212             <!-- Same directory(/test) will be used in the next test -->   
3213      </cleanup-commands>
3214      <comparators>
3215        <comparator>
3216          <type>SubstringComparator</type>
3217          <expected-output>The NameSpace quota (directories and files) of directory /test is exceeded</expected-output>
3218        </comparator>
3219      </comparators>
3220    </test>
3221
3222    <test> <!--Tested -->
3223      <description>verifying error messages for quota commands - setting not valid quota</description>
3224      <test-commands>
3225        <dfs-admin-command>-fs NAMENODE -setQuota 0 /test </dfs-admin-command>
3226      </test-commands>
3227      <cleanup-commands>
3228             <!-- Same directory will be used in the next test -->   
3229      </cleanup-commands>
3230      <comparators>
3231        <comparator>
3232          <type>SubstringComparator</type>
3233          <expected-output>Invalid values for quota : 0</expected-output>
3234        </comparator>
3235      </comparators>
3236    </test>
3237   
3238    <test> <!--Tested -->
3239      <description>verifying error messages for quota commands - setting not valid space quota</description>
3240      <test-commands>
3241        <dfs-admin-command>-fs NAMENODE -setSpaceQuota a5 /test </dfs-admin-command>
3242      </test-commands>
3243      <cleanup-commands>
3244             <!-- Same directory will be used in the next test -->   
3245      </cleanup-commands>
3246      <comparators>
3247        <comparator>
3248          <type>SubstringComparator</type>
3249          <expected-output>For input string: "a5"</expected-output>
3250        </comparator>
3251      </comparators>
3252    </test>
3253   
3254    <test> <!--Tested -->
3255      <description>verifying error messages for quota commands - clearQuota on non existing file</description>
3256      <test-commands>
3257        <dfs-admin-command>-fs NAMENODE -clrQuota /test1 </dfs-admin-command>
3258      </test-commands>
3259      <cleanup-commands>
3260        <command>-fs NAMENODE -rmr /test </command>
3261      </cleanup-commands>
3262      <comparators>
3263        <comparator>
3264          <type>SubstringComparator</type>
3265          <expected-output>Can not find listing for /test1</expected-output>
3266        </comparator>
3267      </comparators>
3268    </test>
3269   
3270    <test> <!--Tested -->
3271      <description>refreshServiceAcl: refreshing security authorization policy for namenode</description>
3272      <test-commands>
3273        <dfs-admin-command>-fs NAMENODE -refreshServiceAcl </dfs-admin-command>
3274      </test-commands>
3275      <cleanup-commands>
3276        <!-- No cleanup -->
3277      </cleanup-commands>
3278      <comparators>
3279        <comparator>
3280          <type>ExactComparator</type>
3281          <expected-output></expected-output>
3282        </comparator>
3283      </comparators>
3284    </test>
3285   
3286    <test> <!--Tested -->
3287      <description>refreshServiceAcl: verifying error message while refreshing security authorization policy for namenode</description>
3288      <test-commands>
3289        <!-- hadoop-policy.xml for tests has
3290             security.refresh.policy.protocol.acl = ${user.name} -->
3291        <dfs-admin-command>-fs NAMENODE -Dhadoop.job.ugi=blah,blah -refreshServiceAcl </dfs-admin-command>
3292      </test-commands>
3293      <cleanup-commands>
3294        <!-- No cleanup -->
3295      </cleanup-commands>
3296      <comparators>
3297        <comparator>
3298          <type>SubstringComparator</type>
3299          <expected-output>access denied</expected-output>
3300        </comparator>
3301      </comparators>
3302    </test>
3303   
3304    <test> <!--Tested -->
3305      <description>refreshServiceAcl: refreshing security authorization policy for jobtracker</description>
3306      <test-commands>
3307        <mr-admin-command>-jt JOBTRACKER -refreshServiceAcl </mr-admin-command>
3308      </test-commands>
3309      <cleanup-commands>
3310        <!-- No cleanup -->
3311      </cleanup-commands>
3312      <comparators>
3313        <comparator>
3314          <type>ExactComparator</type>
3315          <expected-output></expected-output>
3316        </comparator>
3317      </comparators>
3318    </test>
3319   
3320    <test> <!--Tested -->
3321      <description>refreshServiceAcl: verifying error message while refreshing security authorization policy for jobtracker</description>
3322      <test-commands>
3323        <!-- hadoop-policy.xml for tests has
3324             security.refresh.policy.protocol.acl = ${user.name} -->
3325        <mr-admin-command>-jt JOBTRACKER -Dhadoop.job.ugi=blah,blah -refreshServiceAcl </mr-admin-command>
3326      </test-commands>
3327      <cleanup-commands>
3328        <!-- No cleanup -->
3329      </cleanup-commands>
3330      <comparators>
3331        <comparator>
3332          <type>SubstringComparator</type>
3333          <expected-output>access denied</expected-output>
3334        </comparator>
3335      </comparators>
3336    </test>
3337   
3338  </tests>
3339</configuration>
Note: See TracBrowser for help on using the repository browser.