From e076434bc010a55d47e72e55d169b6c64ae83ad7 Mon Sep 17 00:00:00 2001 From: Christian Paredes Date: Thu, 7 Apr 2011 13:18:35 -0700 Subject: [PATCH] Adding in a few more tests for LB's. --- lib/fog/compute/models/bluebox/server.rb | 16 ++-------------- tests/compute/helper.rb | 3 ++- tests/compute/models/server_tests.rb | 1 + tests/compute/requests/bluebox/block_tests.rb | 1 + 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/lib/fog/compute/models/bluebox/server.rb b/lib/fog/compute/models/bluebox/server.rb index 4c6b10245..5353dcef8 100644 --- a/lib/fog/compute/models/bluebox/server.rb +++ b/lib/fog/compute/models/bluebox/server.rb @@ -21,8 +21,8 @@ module Fog attribute :storage attribute :template - attr_accessor :password - attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username, :lb_applications, :lb_services, :lb_backends + attr_accessor :password, :lb_applications, :lb_services, :lb_backends + attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username def initialize(attributes={}) self.flavor_id ||= '94fd37a7-2606-47f7-84d5-9000deda52ae' @@ -45,18 +45,6 @@ module Fog connection.images.get(image_id) end - def lb_applications - @lb_applications - end - - def lb_backends - @lb_backends - end - - def lb_services - @lb_services - end - def private_ip_address nil end diff --git a/tests/compute/helper.rb b/tests/compute/helper.rb index 7c6338f53..2df6c0297 100644 --- a/tests/compute/helper.rb +++ b/tests/compute/helper.rb @@ -9,7 +9,8 @@ def compute_providers Bluebox => { :server_attributes => { :image_id => 'a00baa8f-b5d0-4815-8238-b471c4c4bf72', # Ubuntu 9.10 64bit - :password => 'chunkybacon' + :password => 'chunkybacon', + :lb_applications => '0ea478ca-d528-4764-9828-fc5f222c8c8c' }, :mocked => false }, diff --git a/tests/compute/models/server_tests.rb b/tests/compute/models/server_tests.rb index cc83b274a..89734887c 100644 --- a/tests/compute/models/server_tests.rb +++ b/tests/compute/models/server_tests.rb @@ -11,6 +11,7 @@ for provider, config in compute_providers responds_to(:public_ip_address) responds_to(:scp) responds_to(:ssh) + responds_to(:lb_applications) end end diff --git a/tests/compute/requests/bluebox/block_tests.rb b/tests/compute/requests/bluebox/block_tests.rb index 8580576ea..cc1c4f372 100644 --- a/tests/compute/requests/bluebox/block_tests.rb +++ b/tests/compute/requests/bluebox/block_tests.rb @@ -6,6 +6,7 @@ Shindo.tests('Bluebox::Compute | block requests', ['bluebox']) do 'hostname' => String, 'id' => String, 'ips' => [{'address' => String}], + 'lb_applications => [{'lb_application_name' => String, 'lb_application_id' => String}] 'memory' => Integer, 'product' => Bluebox::Compute::Formats::PRODUCT, 'status' => String,