diff --git a/tests/compute/requests/brightbox/account_tests.rb b/tests/compute/requests/brightbox/account_tests.rb index d1aee1ad8..83cdd7d83 100644 --- a/tests/compute/requests/brightbox/account_tests.rb +++ b/tests/compute/requests/brightbox/account_tests.rb @@ -7,18 +7,10 @@ Shindo.tests('Fog::Compute[:brightbox] | account requests', ['brightbox']) do Fog::Compute[:brightbox].get_account end - unless Fog.mocking? - original_name = Fog::Compute[:brightbox].get_account["name"] - update_args = {:name => "New name from Fog test"} - end - - tests("#update_account(#{update_args.inspect})").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do + update_options = {:name => "Fog@#{Time.now.iso8601}"} + tests("#update_account(#{update_options.inspect})").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do pending if Fog.mocking? - Fog::Compute[:brightbox].update_account(update_args) - end - - unless Fog.mocking? - Fog::Compute[:brightbox].update_account(:name => original_name) + Fog::Compute[:brightbox].update_account(update_options) end tests("#reset_ftp_password_account").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do diff --git a/tests/compute/requests/brightbox/api_client_tests.rb b/tests/compute/requests/brightbox/api_client_tests.rb index b1208d13a..039a5aea4 100644 --- a/tests/compute/requests/brightbox/api_client_tests.rb +++ b/tests/compute/requests/brightbox/api_client_tests.rb @@ -2,7 +2,10 @@ Shindo.tests('Fog::Compute[:brightbox] | api client requests', ['brightbox']) do tests('success') do - create_options = {:name => "Name from Fog test (#{Time.now.to_i})", :description => "Description from Fog test"} + create_options = { + :name => "Fog@#{Time.now.iso8601}", + :description => "Description from Fog test" + } tests("#create_api_client(#{create_options.inspect})").formats(Brightbox::Compute::Formats::Full::API_CLIENT) do pending if Fog.mocking? @@ -21,9 +24,10 @@ Shindo.tests('Fog::Compute[:brightbox] | api client requests', ['brightbox']) do Fog::Compute[:brightbox].get_api_client(@api_client_id) end + update_options = {:name => "Fog@#{Time.now.iso8601}"} tests("#update_api_client('#{@api_client_id}')").formats(Brightbox::Compute::Formats::Full::API_CLIENT) do pending if Fog.mocking? - Fog::Compute[:brightbox].update_api_client(@api_client_id, :name => "New name from Fog test") + Fog::Compute[:brightbox].update_api_client(@api_client_id, update_options) end tests("#destroy_api_client('#{@api_client_id}')").formats(Brightbox::Compute::Formats::Full::API_CLIENT) do diff --git a/tests/compute/requests/brightbox/helper.rb b/tests/compute/requests/brightbox/helper.rb index da47c2c88..1f33f5390 100644 --- a/tests/compute/requests/brightbox/helper.rb +++ b/tests/compute/requests/brightbox/helper.rb @@ -199,7 +199,10 @@ class Brightbox "name" => String, "status" => String, "created_at" => String, - "deleted_at" => Fog::Nullable::String + "deleted_at" => Fog::Nullable::String, + "account" => Brightbox::Compute::Formats::Nested::ACCOUNT, + "nodes" => [Brightbox::Compute::Formats::Nested::SERVER], + "cloud_ips" => [Brightbox::Compute::Formats::Nested::CLOUD_IP] } SERVER = { diff --git a/tests/compute/requests/brightbox/load_balancer_tests.rb b/tests/compute/requests/brightbox/load_balancer_tests.rb index f8ab419df..5c9f1997a 100644 --- a/tests/compute/requests/brightbox/load_balancer_tests.rb +++ b/tests/compute/requests/brightbox/load_balancer_tests.rb @@ -7,7 +7,7 @@ Shindo.tests('Fog::Compute[:brightbox] | load balancer requests', ['brightbox']) node_id = @node.id end - creation_args = { + create_options = { :nodes => [{ :node => node_id }], @@ -22,9 +22,9 @@ Shindo.tests('Fog::Compute[:brightbox] | load balancer requests', ['brightbox']) } } - tests("#create_load_balancer(#{creation_args.inspect})").formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER) do + tests("#create_load_balancer(#{create_options.inspect})").formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER) do pending if Fog.mocking? - data = Fog::Compute[:brightbox].create_load_balancer(creation_args) + data = Fog::Compute[:brightbox].create_load_balancer(create_options) @load_balancer_id = data["id"] data end @@ -33,9 +33,9 @@ Shindo.tests('Fog::Compute[:brightbox] | load balancer requests', ['brightbox']) Fog::Compute[:brightbox].load_balancers.get(@load_balancer_id).wait_for { ready? } end - # tests("#list_load_balancers()").formats(Brightbox::Compute::Formats::Collection::LOAD_BALANCERS) do - # Fog::Compute[:brightbox].list_load_balancers - # end + tests("#list_load_balancers()").formats(Brightbox::Compute::Formats::Collection::LOAD_BALANCERS) do + Fog::Compute[:brightbox].list_load_balancers + end tests("#get_load_balancer('#{@load_balancer_id}')").formats(Brightbox::Compute::Formats::Full::LOAD_BALANCER) do pending if Fog.mocking? diff --git a/tests/compute/requests/brightbox/server_tests.rb b/tests/compute/requests/brightbox/server_tests.rb index 33a72a820..33f0beec9 100644 --- a/tests/compute/requests/brightbox/server_tests.rb +++ b/tests/compute/requests/brightbox/server_tests.rb @@ -28,7 +28,7 @@ Shindo.tests('Fog::Compute[:brightbox] | server requests', ['brightbox']) do tests("#update_server('#{server_id}')").formats(Brightbox::Compute::Formats::Full::SERVER) do pending if Fog.mocking? - Fog::Compute[:brightbox].update_server(server_id, :name => "New name from Fog test") + Fog::Compute[:brightbox].update_server(server_id, :name => "Fog@#{Time.now.iso8601}") end tests("#activate_console_server('#{server_id}')").formats(Brightbox::Compute::Formats::Full::SERVER) do diff --git a/tests/compute/requests/brightbox/user_tests.rb b/tests/compute/requests/brightbox/user_tests.rb index bd30fa258..ef22af5c2 100644 --- a/tests/compute/requests/brightbox/user_tests.rb +++ b/tests/compute/requests/brightbox/user_tests.rb @@ -16,7 +16,7 @@ Shindo.tests('Fog::Compute[:brightbox] | user requests', ['brightbox']) do data end - update_options = { :name => "New name from Fog" } + update_options = { :name => "Fog@#{Time.now.iso8601}" } tests("#update_user('#{@user_id}', #{update_options.inspect})").formats(Brightbox::Compute::Formats::Full::USER) do pending if Fog.mocking?