You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by rl...@redhat.com on 2013/02/28 20:54:36 UTC
Deltacloud - Tests - removing reference to keys collection
First patch adds the new test files
Second patch fixes copy/paste error
Re: Deltacloud - Tests - removing reference to keys collection
Posted by David Lutterkort <lu...@redhat.com>.
On Thu, 2013-02-28 at 14:54 -0500, rlandy@redhat.com wrote:
> First patch adds the new test files
> Second patch fixes copy/paste error
ACK. Committed and pushed
David
[PATCH 2/2] Deltacloud - Tests - removing reference to 'keys' collection
Posted by rl...@redhat.com.
From: Ronelle Landy <rl...@redhat.com>
---
tests/deltacloud/addresses_test.rb | 2 +-
tests/deltacloud/drivers_test.rb | 2 +-
tests/deltacloud/firewalls_test.rb | 2 +-
tests/deltacloud/load_balancers_test.rb | 2 +-
tests/deltacloud/metrics_test.rb | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/deltacloud/addresses_test.rb b/tests/deltacloud/addresses_test.rb
index faba98b..4283bee 100644
--- a/tests/deltacloud/addresses_test.rb
+++ b/tests/deltacloud/addresses_test.rb
@@ -17,7 +17,7 @@
$:.unshift File.join(File.dirname(__FILE__), '..')
require "deltacloud/test_setup.rb"
-describe 'Deltacloud API keys collection' do
+describe 'Deltacloud API addresses collection' do
include Deltacloud::Test::Methods
need_collection :addresses
diff --git a/tests/deltacloud/drivers_test.rb b/tests/deltacloud/drivers_test.rb
index a3e4144..b47cc55 100644
--- a/tests/deltacloud/drivers_test.rb
+++ b/tests/deltacloud/drivers_test.rb
@@ -17,7 +17,7 @@
$:.unshift File.join(File.dirname(__FILE__), '..')
require "deltacloud/test_setup.rb"
-describe 'Deltacloud API keys collection' do
+describe 'Deltacloud API drivers collection' do
include Deltacloud::Test::Methods
need_collection :drivers
diff --git a/tests/deltacloud/firewalls_test.rb b/tests/deltacloud/firewalls_test.rb
index 8a457cd..657a18e 100644
--- a/tests/deltacloud/firewalls_test.rb
+++ b/tests/deltacloud/firewalls_test.rb
@@ -17,7 +17,7 @@
$:.unshift File.join(File.dirname(__FILE__), '..')
require "deltacloud/test_setup.rb"
-describe 'Deltacloud API keys collection' do
+describe 'Deltacloud API firewalls collection' do
include Deltacloud::Test::Methods
need_collection :firewalls
diff --git a/tests/deltacloud/load_balancers_test.rb b/tests/deltacloud/load_balancers_test.rb
index 7de1095..f975be8 100644
--- a/tests/deltacloud/load_balancers_test.rb
+++ b/tests/deltacloud/load_balancers_test.rb
@@ -17,7 +17,7 @@
$:.unshift File.join(File.dirname(__FILE__), '..')
require "deltacloud/test_setup.rb"
-describe 'Deltacloud API keys collection' do
+describe 'Deltacloud API load_balancers collection' do
include Deltacloud::Test::Methods
need_collection :load_balancers
diff --git a/tests/deltacloud/metrics_test.rb b/tests/deltacloud/metrics_test.rb
index c89780b..198d69f 100644
--- a/tests/deltacloud/metrics_test.rb
+++ b/tests/deltacloud/metrics_test.rb
@@ -17,7 +17,7 @@
$:.unshift File.join(File.dirname(__FILE__), '..')
require "deltacloud/test_setup.rb"
-describe 'Deltacloud API keys collection' do
+describe 'Deltacloud API metrics collection' do
include Deltacloud::Test::Methods
need_collection :metrics
--
1.7.7.6
[PATCH 1/2] Deltacloud - Tests - adding blackbox tests for addresses and drivers collections
Posted by rl...@redhat.com.
From: Ronelle Landy <rl...@redhat.com>
---
tests/Rakefile | 2 +-
tests/deltacloud/addresses_test.rb | 28 ++++++++++++++++++++++++++
tests/deltacloud/common_tests_collections.rb | 6 ++--
tests/deltacloud/drivers_test.rb | 28 ++++++++++++++++++++++++++
4 files changed, 60 insertions(+), 4 deletions(-)
create mode 100644 tests/deltacloud/addresses_test.rb
create mode 100644 tests/deltacloud/drivers_test.rb
diff --git a/tests/Rakefile b/tests/Rakefile
index f7e6fe5..30f878d 100644
--- a/tests/Rakefile
+++ b/tests/Rakefile
@@ -23,7 +23,7 @@ namespace :test do
end
namespace :deltacloud do
- ["base_api", "buckets", "images", "instances", "instance_states", "keys", "realms", "storage_volumes", "storage_snapshots", "hardware_profiles"].each do |col|
+ ["addresses", "base_api", "buckets", "drivers", "firewalls", "images", "instances", "instance_states", "keys", "load_balancers", "metrics", "realms", "storage_volumes", "storage_snapshots", "hardware_profiles"].each do |col|
Rake::TestTask.new(col) do |t|
t.test_files = FileList["deltacloud/#{col}_test.rb"]
end
diff --git a/tests/deltacloud/addresses_test.rb b/tests/deltacloud/addresses_test.rb
new file mode 100644
index 0000000..faba98b
--- /dev/null
+++ b/tests/deltacloud/addresses_test.rb
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+$:.unshift File.join(File.dirname(__FILE__), '..')
+require "deltacloud/test_setup.rb"
+
+describe 'Deltacloud API keys collection' do
+ include Deltacloud::Test::Methods
+
+ need_collection :addresses
+
+ #Run the 'common' tests for all collections defined in common_tests_collections.rb
+ CommonCollectionsTest::run_collection_and_member_tests_for("addresses")
+
+end
diff --git a/tests/deltacloud/common_tests_collections.rb b/tests/deltacloud/common_tests_collections.rb
index a80ae39..b754eab 100644
--- a/tests/deltacloud/common_tests_collections.rb
+++ b/tests/deltacloud/common_tests_collections.rb
@@ -39,7 +39,7 @@ module CommonCollectionsTest
end
it "must require authentication to access the #{test_collection} collection" do
- skip "Skipping for #{test_collection} as auth may not be required here" if ["hardware_profiles", "instance_states"].include?(test_collection)
+ skip "Skipping for #{test_collection} as auth may not be required here" if ["hardware_profiles", "instance_states", "drivers"].include?(test_collection)
proc { get(test_collection, :noauth => true) }.must_raise RestClient::Request::Unauthorized
end
@@ -101,7 +101,7 @@ module CommonCollectionsTest
end
it "must have the \"name\" element defined for each #{test_collection.singularize} in collection" do
- skip "Skipping for #{test_collection} as name may not be required here" if ["metrics", "load_balancers"].include?(test_collection)
+ skip "Skipping for #{test_collection} as name may not be required here" if ["metrics", "load_balancers", "addresses"].include?(test_collection)
res = get(test_collection)
(res.xml/"#{test_collection}/#{test_collection.singularize}").each do |r|
(r/'name').wont_be_nil
@@ -118,7 +118,7 @@ module CommonCollectionsTest
end
it "must have the \"name\" element for the #{test_collection.singularize} and it should match with the one in collection" do
- skip "Skipping for #{test_collection} as name may not be required here" if ["metrics", "load_balancers"].include?(test_collection)
+ skip "Skipping for #{test_collection} as name may not be required here" if ["metrics", "load_balancers", "addresses"].include?(test_collection)
res = get(test_collection)
(res.xml/"#{test_collection}/#{test_collection.singularize}").each do |r|
element = get(test_collection+"/#{r[:id]}")
diff --git a/tests/deltacloud/drivers_test.rb b/tests/deltacloud/drivers_test.rb
new file mode 100644
index 0000000..a3e4144
--- /dev/null
+++ b/tests/deltacloud/drivers_test.rb
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership. The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+$:.unshift File.join(File.dirname(__FILE__), '..')
+require "deltacloud/test_setup.rb"
+
+describe 'Deltacloud API keys collection' do
+ include Deltacloud::Test::Methods
+
+ need_collection :drivers
+
+ #Run the 'common' tests for all collections defined in common_tests_collections.rb
+ CommonCollectionsTest::run_collection_and_member_tests_for("drivers")
+
+end
--
1.7.7.6