spec/lib/elasticity/hive_step_spec.rb in elasticity-2.4 vs spec/lib/elasticity/hive_step_spec.rb in elasticity-2.5
- old
+ new
@@ -18,14 +18,18 @@
step[:name].should == 'Elasticity Hive Step (script.hql)'
step[:action_on_failure].should == 'TERMINATE_JOB_FLOW'
step[:hadoop_jar_step][:jar].should == 's3://elasticmapreduce/libs/script-runner/script-runner.jar'
step[:hadoop_jar_step][:args].should start_with([
's3://elasticmapreduce/libs/hive/hive-script',
- '--run-hive-script',
- '--args',
- '-f',
- 'script.hql'
+ '--base-path',
+ 's3://elasticmapreduce/libs/hive/',
+ '--hive-versions',
+ 'latest',
+ '--run-hive-script',
+ '--args',
+ '-f',
+ 'script.hql'
])
end
context 'when variables are provided' do
let(:hs_with_variables) do
@@ -37,11 +41,11 @@
end
end
it 'should convert to aws step format' do
step = hs_with_variables.to_aws_step(Elasticity::JobFlow.new('access', 'secret'))
- step[:hadoop_jar_step][:args][5..9].should == %w(-d VAR1=VALUE1 -d VAR2=VALUE2)
+ step[:hadoop_jar_step][:args][9..13].should == %w(-d VAR1=VALUE1 -d VAR2=VALUE2)
end
end
end
@@ -58,14 +62,14 @@
:action_on_failure => 'TERMINATE_JOB_FLOW',
:hadoop_jar_step => {
:jar => 's3://elasticmapreduce/libs/script-runner/script-runner.jar',
:args => [
's3://elasticmapreduce/libs/hive/hive-script',
- '--base-path',
- 's3://elasticmapreduce/libs/hive/',
- '--install-hive',
- '--hive-versions',
- 'latest'
+ '--base-path',
+ 's3://elasticmapreduce/libs/hive/',
+ '--install-hive',
+ '--hive-versions',
+ 'latest'
],
},
:name => 'Elasticity - Install Hive'
}
end
\ No newline at end of file