Skip to content

Commit e2814a6

Browse files
committed
Fix tests
Signed-off-by: Stephen Hoekstra <[email protected]>
1 parent f747ccd commit e2814a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/vagrant-cloudstack/action/run_instance_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,11 @@
262262
expect(server).to receive(:wait_for).and_return(ready = true)
263263
allow(server).to receive(:password_enabled).and_return(false)
264264
expect(cloudstack_compute).to receive(:servers).and_return(servers)
265-
allow(cloudstack_compute).to receive(:send).with(:list_zones, available: true).and_return(list_zones_response)
266-
allow(cloudstack_compute).to receive(:send).with(:list_service_offerings, listall: true)
265+
allow(cloudstack_compute).to receive(:send).with(:list_zones, available: true, name: ZONE_NAME).and_return(list_zones_response)
266+
allow(cloudstack_compute).to receive(:send).with(:list_service_offerings, listall: true, name: SERVICE_OFFERING_NAME)
267267
.and_return(list_service_offerings_response)
268268
allow(cloudstack_compute).to receive(:send)
269-
.with(:list_templates, zoneid: ZONE_ID, templatefilter: 'executable', listall: true)
269+
.with(:list_templates, zoneid: ZONE_ID, templatefilter: 'executable', listall: true, name: TEMPLATE_NAME)
270270
.and_return(list_templates_response)
271271
allow(cloudstack_compute).to receive(:zones).and_return([cloudstack_zone])
272272
allow(servers).to receive(:create).with(create_servers_parameters).and_return(server)
@@ -413,7 +413,7 @@
413413
let(:volume) { double('Fog::Compute::Cloudstack::Volume') }
414414

415415
before(:each) do
416-
allow(cloudstack_compute).to receive(:send).with(:list_disk_offerings, listall: true)
416+
allow(cloudstack_compute).to receive(:send).with(:list_disk_offerings, listall: true, name: DISK_OFFERING_NAME)
417417
.and_return(list_disk_offerings_response)
418418
expect(cloudstack_compute).to receive(:volumes).and_return([volume])
419419
allow(volume).to receive(:server_id).and_return(SERVER_ID)

0 commit comments

Comments
 (0)