|
9 | 9 | let(:provision_hash) { args[:provision_hash] }
|
10 | 10 | let(:results) { args[:results] }
|
11 | 11 | let(:params) { args[:params] }
|
| 12 | + let(:inventory_file) { File.join(Dir.pwd, 'spec', 'fixtures', 'litmus_inventory.yaml') } |
12 | 13 |
|
13 | 14 | it 'calls function' do
|
14 | 15 | allow(File).to receive(:directory?).and_call_original
|
|
42 | 43 | inventory_vars: nil,
|
43 | 44 | provision_hash: { 'default' => { 'provisioner' => 'docker', 'images' => ['waffleimage/centos7'] } },
|
44 | 45 | results: [],
|
45 |
| - params: { 'action' => 'provision', 'platform' => 'waffleimage/centos7', 'inventory' => Dir.pwd } |
| 46 | + params: { 'action' => 'provision', 'platform' => 'waffleimage/centos7', 'inventory' => inventory_file } |
46 | 47 | },
|
47 | 48 | {
|
48 | 49 | provisioner: 'vagrant',
|
49 | 50 | platform: 'centos7',
|
50 | 51 | inventory_vars: nil,
|
51 | 52 | provision_hash: { 'default' => { 'provisioner' => 'vagrant', 'images' => ['centos7'] } },
|
52 | 53 | results: [],
|
53 |
| - params: { 'action' => 'provision', 'platform' => 'centos7', 'inventory' => Dir.pwd } |
| 54 | + params: { 'action' => 'provision', 'platform' => 'centos7', 'inventory' => inventory_file } |
54 | 55 | }
|
55 | 56 | ].freeze
|
56 | 57 |
|
|
68 | 69 | [{ 'uri' => 'some.host', 'facts' => { 'provisioner' => 'docker', 'container_name' => 'foo', 'platform' => 'some.host' } }] }] }
|
69 | 70 | end
|
70 | 71 | let(:targets) { ['some.host'] }
|
71 |
| - let(:params) { { 'action' => 'tear_down', 'node_name' => 'some.host', 'inventory' => Dir.pwd } } |
| 72 | + let(:params) { { 'action' => 'tear_down', 'node_name' => 'some.host', 'inventory' => inventory_file } } |
72 | 73 |
|
73 | 74 | it 'calls function' do
|
74 | 75 | allow(File).to receive(:directory?).with(File.join(described_class::DEFAULT_CONFIG_DATA['modulepath'], 'provision')).and_return(true)
|
|
89 | 90 | ] }] }
|
90 | 91 | end
|
91 | 92 | let(:targets) { ['one.host'] }
|
92 |
| - let(:params) { { 'action' => 'tear_down', 'node_name' => 'one.host', 'inventory' => Dir.pwd } } |
| 93 | + let(:params) { { 'action' => 'tear_down', 'node_name' => 'one.host', 'inventory' => inventory_file } } |
93 | 94 |
|
94 | 95 | it 'calls function' do
|
95 | 96 | allow(File).to receive(:directory?).with(File.join(described_class::DEFAULT_CONFIG_DATA['modulepath'], 'provision')).and_return(true)
|
|
0 commit comments