deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject [2/2] git commit: Deltacloud - Tests - adding blackbox tests for addresses and drivers collections
Date Fri, 01 Mar 2013 00:22:32 GMT
Updated Branches:
  refs/heads/master d96847ba9 -> 0faa7b99c


Deltacloud - Tests - adding blackbox tests for addresses and drivers collections


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/fc794891
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/fc794891
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/fc794891

Branch: refs/heads/master
Commit: fc7948914f402f921c594061d3eb396e0f109c0d
Parents: d96847b
Author: Ronelle Landy <rlandy@redhat.com>
Authored: Thu Feb 28 14:54:37 2013 -0500
Committer: David Lutterkort <lutter@redhat.com>
Committed: Thu Feb 28 16:19:33 2013 -0800

----------------------------------------------------------------------
 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(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fc794891/tests/Rakefile
----------------------------------------------------------------------
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

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fc794891/tests/deltacloud/addresses_test.rb
----------------------------------------------------------------------
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

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fc794891/tests/deltacloud/common_tests_collections.rb
----------------------------------------------------------------------
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]}")

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fc794891/tests/deltacloud/drivers_test.rb
----------------------------------------------------------------------
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


Mime
View raw message