|
28 | 28 | end
|
29 | 29 |
|
30 | 30 | it 'should accept _catch_errors' do
|
31 |
| - result = run_task('sample::echo', 'non_existent_node', '_catch_errors' => true) |
| 31 | + result = run_task('sample::echo', 'non_existent_node', { '_catch_errors' => true }) |
32 | 32 |
|
33 | 33 | expect(result[0]['status']).to eq('failure')
|
34 | 34 | expect(result[0]['value']['_error']['kind']).to eq('puppetlabs.tasks/connect-error')
|
|
85 | 85 |
|
86 | 86 | describe 'run_plan' do
|
87 | 87 | it 'should run a plan' do
|
88 |
| - result = run_plan('sample::single_task', 'nodes' => 'ssh') |
| 88 | + result = run_plan('sample::single_task', { 'nodes' => 'ssh' }) |
89 | 89 | expect(result['status']).to eq('success')
|
90 | 90 | data = result['value'][0]
|
91 | 91 | expect(data['status']).to eq('success')
|
92 | 92 | end
|
93 | 93 |
|
94 | 94 | it 'should return a failure' do
|
95 |
| - result = run_plan('error::run_fail', 'targets' => 'ssh') |
| 95 | + result = run_plan('error::run_fail', { 'targets' => 'ssh' }) |
96 | 96 | expect(result['status']).to eq('failure')
|
97 | 97 | expect(result['value']['kind']).to eq('bolt/run-failure')
|
98 | 98 | end
|
99 | 99 |
|
100 | 100 | it 'runs a plan that downloads a file' do
|
101 |
| - result = run_plan('sample::download_file', 'nodes' => 'ssh') |
| 101 | + result = run_plan('sample::download_file', { 'nodes' => 'ssh' }) |
102 | 102 | expect(result['status']).to eq('success')
|
103 | 103 | data = result['value'][0]
|
104 | 104 | expect(data['value']['path']).to match(%r{^/tmp/})
|
|
0 commit comments