diff --git a/tests/rackspace/models/block_storage/snapshot_tests.rb b/tests/rackspace/models/block_storage/snapshot_tests.rb index 24a23de74..1cde94237 100644 --- a/tests/rackspace/models/block_storage/snapshot_tests.rb +++ b/tests/rackspace/models/block_storage/snapshot_tests.rb @@ -1,6 +1,5 @@ -service = Fog::Rackspace::BlockStorage.new - Shindo.tests('Fog::Rackspace::BlockStorage | snapshot', ['rackspace']) do + service = Fog::Rackspace::BlockStorage.new begin volume = service.volumes.create({ diff --git a/tests/rackspace/models/compute_v2/flavors_tests.rb b/tests/rackspace/models/compute_v2/flavors_tests.rb index be19d22f8..d27d13d69 100644 --- a/tests/rackspace/models/compute_v2/flavors_tests.rb +++ b/tests/rackspace/models/compute_v2/flavors_tests.rb @@ -1,6 +1,6 @@ -service = Fog::Compute::RackspaceV2.new - Shindo.tests('Fog::Compute::RackspaceV2 | flavors', ['rackspace']) do + service = Fog::Compute::RackspaceV2.new + tests("success") do tests("#all").succeeds do service.flavors.all diff --git a/tests/rackspace/models/compute_v2/image_tests.rb b/tests/rackspace/models/compute_v2/image_tests.rb index a8a3d45ee..d0791a01f 100644 --- a/tests/rackspace/models/compute_v2/image_tests.rb +++ b/tests/rackspace/models/compute_v2/image_tests.rb @@ -1,8 +1,7 @@ -service = Fog::Compute::RackspaceV2.new -flavor_id = Fog.credentials[:rackspace_flavor_id] || service.flavors.first.id -image_id = Fog.credentials[:rackspace_image_id] || service.images.first.id - Shindo.tests('Fog::Compute::RackspaceV2 | image', ['rackspace']) do + service = Fog::Compute::RackspaceV2.new + flavor_id = Fog.credentials[:rackspace_flavor_id] || service.flavors.first.id + image_id = Fog.credentials[:rackspace_image_id] || service.images.first.id test_time = Time.now.to_i.to_s options = { diff --git a/tests/rackspace/models/compute_v2/images_tests.rb b/tests/rackspace/models/compute_v2/images_tests.rb index 21b121a63..a0bb4a311 100644 --- a/tests/rackspace/models/compute_v2/images_tests.rb +++ b/tests/rackspace/models/compute_v2/images_tests.rb @@ -1,6 +1,5 @@ -service = Fog::Compute::RackspaceV2.new - Shindo.tests('Fog::Compute::RackspaceV2 | images', ['rackspace']) do + service = Fog::Compute::RackspaceV2.new image_id = nil diff --git a/tests/rackspace/models/compute_v2/server_tests.rb b/tests/rackspace/models/compute_v2/server_tests.rb index 4da38c21d..11df2607a 100644 --- a/tests/rackspace/models/compute_v2/server_tests.rb +++ b/tests/rackspace/models/compute_v2/server_tests.rb @@ -1,11 +1,10 @@ -service = Fog::Compute::RackspaceV2.new -cbs_service = Fog::Rackspace::BlockStorage.new - -flavor_id = Fog.credentials[:rackspace_flavor_id] || service.flavors.first.id -image_id = Fog.credentials[:rackspace_image_id] || service.images.first.id -image_id ||= Fog.mocking? ? service.images.first.id : service.images.find {|image| image.name =~ /Ubuntu/}.id # use the first Ubuntu image - Shindo.tests('Fog::Compute::RackspaceV2 | server', ['rackspace']) do + service = Fog::Compute::RackspaceV2.new + cbs_service = Fog::Rackspace::BlockStorage.new + + flavor_id = Fog.credentials[:rackspace_flavor_id] || service.flavors.first.id + image_id = Fog.credentials[:rackspace_image_id] || service.images.first.id + image_id ||= Fog.mocking? ? service.images.first.id : service.images.find {|image| image.name =~ /Ubuntu/}.id # use the first Ubuntu image options = { :name => "fog_server_#{Time.now.to_i.to_s}", diff --git a/tests/rackspace/models/compute_v2/servers_tests.rb b/tests/rackspace/models/compute_v2/servers_tests.rb index ba77adf16..7831f24a1 100644 --- a/tests/rackspace/models/compute_v2/servers_tests.rb +++ b/tests/rackspace/models/compute_v2/servers_tests.rb @@ -1,8 +1,8 @@ -connection = Fog::Compute::RackspaceV2.new -flavor_id = Fog.credentials[:rackspace_flavor_id] || connection.flavors.first.id -image_id = Fog.credentials[:rackspace_image_id] || connection.images.first.id - Shindo.tests('Fog::Compute::RackspaceV2 | servers', ['rackspace']) do + connection = Fog::Compute::RackspaceV2.new + flavor_id = Fog.credentials[:rackspace_flavor_id] || connection.flavors.first.id + image_id = Fog.credentials[:rackspace_image_id] || connection.images.first.id + options = { :name => "fog_server_#{Time.now.to_i.to_s}", :flavor_id => flavor_id, diff --git a/tests/rackspace/requests/block_storage/snapshot_tests.rb b/tests/rackspace/requests/block_storage/snapshot_tests.rb index 526b9faad..cdd18766c 100644 --- a/tests/rackspace/requests/block_storage/snapshot_tests.rb +++ b/tests/rackspace/requests/block_storage/snapshot_tests.rb @@ -1,5 +1,6 @@ -timeout = Fog.mocking? ? 1 : 10 Shindo.tests('Fog::Rackspace::BlockStorage | snapshot_tests', ['rackspace']) do + timeout = Fog.mocking? ? 1 : 10 + snapshot_format = { 'id' => String, 'status' => String, diff --git a/tests/rackspace/requests/compute_v2/attachment_tests.rb b/tests/rackspace/requests/compute_v2/attachment_tests.rb index 20db8e779..dc8ff5bd9 100644 --- a/tests/rackspace/requests/compute_v2/attachment_tests.rb +++ b/tests/rackspace/requests/compute_v2/attachment_tests.rb @@ -1,10 +1,9 @@ -compute_service = Fog::Compute::RackspaceV2.new -block_storage_service = Fog::Rackspace::BlockStorage.new -image_id = Fog.credentials[:rackspace_image_id] || compute_service.images.first.id -flavor_id = Fog.credentials[:rackspace_flavor_id] || compute_service.flavors.first.id -timeout = Fog.mocking? ? 1 : 10 - Shindo.tests('Fog::Compute::RackspaceV2 | attachment_tests', ['rackspace']) do + compute_service = Fog::Compute::RackspaceV2.new + block_storage_service = Fog::Rackspace::BlockStorage.new + image_id = Fog.credentials[:rackspace_image_id] || compute_service.images.first.id + flavor_id = Fog.credentials[:rackspace_flavor_id] || compute_service.flavors.first.id + timeout = Fog.mocking? ? 1 : 10 attachment_format = { 'volumeAttachment' => { diff --git a/tests/rackspace/requests/compute_v2/image_tests.rb b/tests/rackspace/requests/compute_v2/image_tests.rb index d9da79939..d375d62a9 100644 --- a/tests/rackspace/requests/compute_v2/image_tests.rb +++ b/tests/rackspace/requests/compute_v2/image_tests.rb @@ -1,8 +1,7 @@ -service = Fog::Compute.new(:provider => 'Rackspace', :version => 'V2') -flavor_id = Fog.credentials[:rackspace_flavor_id] || service.flavors.first.id -image_id = Fog.credentials[:rackspace_image_id] || service.images.first.id - Shindo.tests('Fog::Compute::RackspaceV2 | image_tests', ['rackspace']) do + service = Fog::Compute.new(:provider => 'Rackspace', :version => 'V2') + flavor_id = Fog.credentials[:rackspace_flavor_id] || service.flavors.first.id + image_id = Fog.credentials[:rackspace_image_id] || service.images.first.id image_format = { 'id' => String, diff --git a/tests/rackspace/requests/compute_v2/server_tests.rb b/tests/rackspace/requests/compute_v2/server_tests.rb index fb8e72ac0..ed7624b3a 100644 --- a/tests/rackspace/requests/compute_v2/server_tests.rb +++ b/tests/rackspace/requests/compute_v2/server_tests.rb @@ -1,9 +1,8 @@ -service = Fog::Compute.new(:provider => 'Rackspace', :version => 'V2') -image_id = Fog.credentials[:rackspace_image_id] -image_id ||= Fog.mocking? ? service.images.first.id : service.images.find {|image| image.name =~ /Ubuntu/}.id # use the first Ubuntu image -flavor_id = Fog.credentials[:rackspace_flavor_id] || service.flavors.first.id - Shindo.tests('Fog::Compute::RackspaceV2 | server_tests', ['rackspace']) do + service = Fog::Compute.new(:provider => 'Rackspace', :version => 'V2') + image_id = Fog.credentials[:rackspace_image_id] + image_id ||= Fog.mocking? ? service.images.first.id : service.images.find {|image| image.name =~ /Ubuntu/}.id # use the first Ubuntu image + flavor_id = Fog.credentials[:rackspace_flavor_id] || service.flavors.first.id link_format = { 'href' => String,