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 'minitest/autorun'
|
||||||
require 'nokogiri'
|
require 'nokogiri'
|
||||||
require './lib/fog/vcloud_director/generators/compute/instantiate_vapp_template_params.rb'
|
require './lib/fog/vcloud_director/generators/compute/instantiate_vapp_template_params.rb'
|
||||||
|
@ -62,8 +63,6 @@ describe Fog::Generators::Compute::VcloudDirector::InstantiateVappTemplateParams
|
||||||
it "Allows New VM Parameters" do
|
it "Allows New VM Parameters" do
|
||||||
nodes = xml.xpath('//xmlns:VmGeneralParams')
|
nodes = xml.xpath('//xmlns:VmGeneralParams')
|
||||||
nodes.length.must_equal 2
|
nodes.length.must_equal 2
|
||||||
puts nodes
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
|
@ -1,7 +1,12 @@
|
||||||
|
require './spec/vcloud_director/spec_helper.rb'
|
||||||
require 'minitest/autorun'
|
require 'minitest/autorun'
|
||||||
require './lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb'
|
require './lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb'
|
||||||
|
|
||||||
describe Fog::Compute::VcloudDirector::Real do
|
describe Fog::Compute::VcloudDirector::Real do
|
||||||
|
before do
|
||||||
|
Fog.unmock!
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
let(:xml) do
|
let(:xml) do
|
||||||
service = Fog::Compute::VcloudDirector.new()
|
service = Fog::Compute::VcloudDirector.new()
|
||||||
|
@ -57,7 +62,9 @@ describe Fog::Compute::VcloudDirector::Real do
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
after do
|
||||||
|
Fog.mock!
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
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