From 8837189b7a0b0e805b04051fe920b06121c602eb Mon Sep 17 00:00:00 2001 From: Dan Abel Date: Mon, 11 Nov 2013 17:13:41 +0000 Subject: [PATCH] [vcloud_director] fix models vms_test so is pending on empty environment --- tests/vcloud_director/models/compute/vms_tests.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/vcloud_director/models/compute/vms_tests.rb b/tests/vcloud_director/models/compute/vms_tests.rb index 151ff6fab..73c3dbbeb 100644 --- a/tests/vcloud_director/models/compute/vms_tests.rb +++ b/tests/vcloud_director/models/compute/vms_tests.rb @@ -4,7 +4,8 @@ Shindo.tests("Compute::VcloudDirector | vms", ['vclouddirector', 'all']) do pending if Fog.mocking? vapp = vapps.detect {|v| v.vms.size >= 1} - tests("#There is more than one vm").returns(true){ vapp.vms.size >= 1 } + # we can't run these tests if there is no vapps with a vm in them + pending unless vapp vms = vapp.vms vm = vms.first