mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
add spec helper with creds
This commit is contained in:
parent
a342fe7971
commit
2c14642035
3 changed files with 21 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
|||
require './spec/vcloud_director/spec_helper.rb'
|
||||
require 'minitest/autorun'
|
||||
require 'nokogiri'
|
||||
require './lib/fog/vcloud_director/generators/compute/instantiate_vapp_template_params.rb'
|
||||
|
@ -61,9 +62,7 @@ describe Fog::Generators::Compute::VcloudDirector::InstantiateVappTemplateParams
|
|||
|
||||
it "Allows New VM Parameters" do
|
||||
nodes = xml.xpath('//xmlns:VmGeneralParams')
|
||||
nodes.length.must_equal 2
|
||||
puts nodes
|
||||
|
||||
nodes.length.must_equal 2
|
||||
end
|
||||
|
||||
end
|
|
@ -1,8 +1,13 @@
|
|||
require './spec/vcloud_director/spec_helper.rb'
|
||||
require 'minitest/autorun'
|
||||
require './lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb'
|
||||
|
||||
describe Fog::Compute::VcloudDirector::Real do
|
||||
before do
|
||||
Fog.unmock!
|
||||
end
|
||||
|
||||
|
||||
let(:xml) do
|
||||
service = Fog::Compute::VcloudDirector.new()
|
||||
|
||||
|
@ -57,7 +62,9 @@ describe Fog::Compute::VcloudDirector::Real do
|
|||
end
|
||||
|
||||
|
||||
|
||||
after do
|
||||
Fog.mock!
|
||||
end
|
||||
|
||||
|
||||
end
|
11
spec/vcloud_director/spec_helper.rb
Normal file
11
spec/vcloud_director/spec_helper.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
if ENV["FOG_MOCK"] == "true"
|
||||
Fog.mock!
|
||||
end
|
||||
|
||||
if Fog.mock?
|
||||
Fog.credentials = {
|
||||
:vcloud_director_host => 'vcloud-director-host',
|
||||
:vcloud_director_password => 'vcloud_director_password',
|
||||
:vcloud_director_username => 'vcd_user@vcd_org_name',
|
||||
}.merge(Fog.credentials)
|
||||
end
|
Loading…
Add table
Reference in a new issue