From 2ad0a324a51d70fbf400d44c18b08bd3df5f2039 Mon Sep 17 00:00:00 2001 From: Rupak Ganguly Date: Fri, 6 Apr 2012 15:29:41 -0400 Subject: [PATCH] Add tests for address model and addresses collection. --- tests/hp/models/compute/address_tests.rb | 16 ++++++++++++++++ tests/hp/models/compute/addresses_tests.rb | 5 +++++ 2 files changed, 21 insertions(+) create mode 100644 tests/hp/models/compute/address_tests.rb create mode 100644 tests/hp/models/compute/addresses_tests.rb diff --git a/tests/hp/models/compute/address_tests.rb b/tests/hp/models/compute/address_tests.rb new file mode 100644 index 000000000..6fe192288 --- /dev/null +++ b/tests/hp/models/compute/address_tests.rb @@ -0,0 +1,16 @@ +Shindo.tests("Fog::Compute[:hp] | address", ['hp']) do + + model_tests(Fog::Compute[:hp].addresses, {}, true) do + + @server = Fog::Compute[:hp].servers.create(:name => "fogservertests", :flavor_id => 100, :image_id => 1242) + @server.wait_for { ready? } + + tests('#server=').succeeds do + @instance.server = @server + end + + @server.destroy + + end + +end diff --git a/tests/hp/models/compute/addresses_tests.rb b/tests/hp/models/compute/addresses_tests.rb new file mode 100644 index 000000000..eb821772b --- /dev/null +++ b/tests/hp/models/compute/addresses_tests.rb @@ -0,0 +1,5 @@ +Shindo.tests("Fog::Compute[:hp] | addresses", ['hp']) do + + collection_tests(Fog::Compute[:hp].addresses, {}, true) + +end \ No newline at end of file