mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ecloud] Fixes tests by duplicating test setup
In order to have two different groups of server tests the ecloud tests are in two sets within the one file - which explains the setup outside of the Shindo block. Shindo's tags do not work when nested so this fixes the problem by duplicating the test setup in the second group of tests. Fog::Compute can't safely sit outside the top Shindo block so the duplication is preferable to breaking all/ecloud tests. Also corrected the missing provider tag in this second set so the "attributes" tests do not run when should be filtered by tags.
This commit is contained in:
parent
b7b7f51b0b
commit
02ff54a3e5
1 changed files with 9 additions and 1 deletions
|
@ -127,7 +127,15 @@ Shindo.tests("Fog::Compute[:#{provider}] | servers", [provider.to_s, "operations
|
|||
end
|
||||
end
|
||||
|
||||
Shindo.tests("Fog::Compute[:#{provider}] | server", "attributes") do
|
||||
Shindo.tests("Fog::Compute[:#{provider}] | server", [provider.to_s, "attributes"]) do
|
||||
connection = Fog::Compute[provider]
|
||||
organization = connection.organizations.first
|
||||
environment = organization.environments.find{|e| e.name == config[:server_attributes][:environment_name]} || organization.environments.first
|
||||
public_ip = environment.public_ips.first
|
||||
compute_pool = environment.compute_pools.first
|
||||
image_href = Fog.credentials[:ecloud_image_href] || compute_pool.templates.first.href
|
||||
ssh_key = organization.admin.ssh_keys.detect { |key| key.name == "root" }
|
||||
|
||||
@network = environment.networks.first
|
||||
options = config[:server_attributes].merge(:network_uri => @network.href, :ssh_key_uri => ssh_key.href)
|
||||
#if Fog.credentials[:ecloud_ssh_key_id]
|
||||
|
|
Loading…
Reference in a new issue