mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ecloud|compute] Fixes ecloud server tests
Fixes regression in #1473, attempting to create an Elcoud service connection even when tests should not run fails due to missing credentials.
This commit is contained in:
parent
a2255c7a66
commit
97a7a1faf8
1 changed files with 7 additions and 7 deletions
|
@ -1,4 +1,6 @@
|
||||||
provider, config = :ecloud, compute_providers[:ecloud]
|
provider, config = :ecloud, compute_providers[:ecloud]
|
||||||
|
|
||||||
|
Shindo.tests("Fog::Compute[:#{provider}] | servers", [provider.to_s, "operations"]) do
|
||||||
connection = Fog::Compute[provider]
|
connection = Fog::Compute[provider]
|
||||||
organization = connection.organizations.first
|
organization = connection.organizations.first
|
||||||
environment = organization.environments.find{|e| e.name == config[:server_attributes][:environment_name]} || organization.environments.first
|
environment = organization.environments.find{|e| e.name == config[:server_attributes][:environment_name]} || organization.environments.first
|
||||||
|
@ -7,8 +9,6 @@ compute_pool = environment.compute_pools.first
|
||||||
image_href = Fog.credentials[:ecloud_image_href] || compute_pool.templates.first.href
|
image_href = Fog.credentials[:ecloud_image_href] || compute_pool.templates.first.href
|
||||||
ssh_key = organization.admin.ssh_keys.detect { |key| key.name == "root" }
|
ssh_key = organization.admin.ssh_keys.detect { |key| key.name == "root" }
|
||||||
|
|
||||||
Shindo.tests("Fog::Compute[:#{provider}] | servers", [provider.to_s, "operations"]) do
|
|
||||||
|
|
||||||
@network = environment.networks.first
|
@network = environment.networks.first
|
||||||
options = config[:server_attributes].merge(:network_uri => @network.href, :ssh_key_uri => ssh_key.href)
|
options = config[:server_attributes].merge(:network_uri => @network.href, :ssh_key_uri => ssh_key.href)
|
||||||
#if Fog.credentials[:ecloud_ssh_key_id]
|
#if Fog.credentials[:ecloud_ssh_key_id]
|
||||||
|
|
Loading…
Add table
Reference in a new issue