| ############################################################################ |
| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| $cfg = { |
| 'driver' => 'Pig', |
| 'nummachines' => 5, |
| # 'noverify' => 'true', |
| |
| |
| # 1 Test that a nested foreach gives instant feedback: after user issue the foreach statement in Grunt |
| # 2 Test that a nested foreach gives instant feedback: as part of execution: when we run this foreach statement, we will dump the schema for the nested alias |
| # 3 Describe single Alias resulting from a nested Foreach |
| # 4 Describe multiple Alias resulting from a nested Foreach |
| # 5 Describe resulting from a nested Foreach that contains a positional parameter |
| # 6 Describe for child Alias resulting from a nested Foreach where the child alias had multiple assignments The expected behavior is that the last assignment will destermine the result of the describe statement. |
| # 7 Describe for an Alias resulting from a nested Foreach where the projection for the nested alias is empty |
| # 8 Describe within a foreach statement |
| # 9 Describe for alias with complex data types |
| # 10 Describe that uses references an alias from an AS clause |
| |
| 'groups' => [ |
| { |
| 'name' => 'Grunt', |
| 'tests' => [ |
| { |
| 'num' => 1, |
| 'pig' => "sh ls :PIGHARNESS:", |
| 'expected_out_regex' => "libexec", |
| 'rc' => 0 |
| },{ |
| 'num' => 2, |
| 'pig' => "pwd", |
| 'execonly' => 'mapred,tez,spark', # don't have a clue what their cwd will be for local mode |
| 'expected_out_regex' => "/user", |
| 'rc' => 0 |
| },{ |
| 'num' => 3, |
| 'pig' => "ls .", |
| 'execonly' => 'mapred,tez,spark', |
| 'expected_out_regex' => "/user", |
| 'rc' => 0 |
| },{ |
| 'num' => 4, |
| 'pig' => "ls :INPATH:", |
| ,'expected_out_regex' => ".*singlefile" |
| ,'rc' => 0 |
| |
| },{ |
| 'num' => 6, |
| 'pig' => "cat nonexist" |
| ,'expected_err_regex' => "does not exist" |
| ,'rc' => 5 |
| |
| },{ |
| 'num' => 7, |
| 'pig' => "fs -ls :INPATH:", |
| 'expected_out_regex' => ".*singlefile", |
| 'rc' => 0 |
| },{ |
| 'num' => 8, |
| 'pig' => "cat :INPATH:/singlefile/studenttab10k", |
| 'expected_out_regex' => ":Grunt_8_output:", |
| 'rc' => 0 |
| },{ |
| 'num' => 9, |
| 'pig' => "cd :INPATH: |
| pwd", |
| 'expected_out_regex' => ".*data", |
| 'rc' => 0 |
| },{ |
| 'num' => 10, |
| 'pig' => "mkdir :OUTPATH: |
| cp :INPATH:/singlefile/studenttab10k :OUTPATH: |
| ls :OUTPATH:", |
| 'expected_out_regex' => ".*studenttab10k", |
| 'rc' => 0 |
| },{ |
| 'num' => 11, |
| 'pig' => "cp :INPATH:/singlefile/studenttab10k :OUTPATH:/fred |
| ls :OUTPATH:", |
| 'expected_out_regex' => ".*fred", |
| 'rc' => 0 |
| },{ |
| 'num' => 12, |
| 'pig' => "cp :INPATH:/singlefile/studenttab10k :OUTPATH:/jim |
| mv :OUTPATH:/jim :OUTPATH:/bob |
| ls :OUTPATH:", |
| 'expected_out_regex' => ".*bob", |
| 'rc' => 0 |
| },{ |
| 'num' => 13, |
| 'pig' => "copyToLocal :INPATH:/singlefile/studenttab10k :TMP: |
| sh cat :TMP:/studenttab10k", |
| 'expected_out_regex' => ":Grunt_13_output:", |
| 'rc' => 0 |
| },{ |
| 'num' => 14, |
| 'pig' => "copyToLocal :INPATH:/singlefile/votertab10k :TMP: |
| copyFromLocal :TMP:/votertab10k :OUTPATH:/joe |
| cat :OUTPATH:/joe", |
| 'expected_out_regex' => ":Grunt_14_output:", |
| 'rc' => 0 |
| },{ |
| 'num' => 15, |
| 'pig' => "cp :INPATH:/singlefile/studenttab10k :OUTPATH:/fred |
| rm :OUTPATH:/fred", |
| 'not_expected_out_regex' => "fred", |
| 'rc' => 0 |
| },{ |
| 'num' => 16, |
| 'pig' => "rmf :OUTPATH:/jill", |
| 'rc' => 0 |
| } |
| ] |
| }, |
| ], |
| }, |
| ; |
| |