1
0
Fork 0
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:
Paul Thornthwaite 2013-01-17 11:07:38 +00:00
parent b7b7f51b0b
commit 02ff54a3e5

View file

@ -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]