You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2013/02/27 20:38:46 UTC

[2/2] git commit: Deltacloud - Tests - adding blackbox tests for metrics, firewalls and load balancers

Updated Branches:
  refs/heads/master a8d19ea5a -> 91112fddc


Deltacloud - Tests - adding blackbox tests for metrics, firewalls and load balancers

TrackedAt: http://tracker.deltacloud.org/patch/1047c2d5ad628b3e287b05d4e8e152daf46780f0


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

Branch: refs/heads/master
Commit: 91112fddc3927696d1a1fa20af7946c2921a2d9f
Parents: a4e196e
Author: Ronelle Landy <rl...@redhat.com>
Authored: Tue Feb 26 12:44:04 2013 -0500
Committer: Michal fojtik <mf...@redhat.com>
Committed: Wed Feb 27 20:37:52 2013 +0100

----------------------------------------------------------------------
 tests/deltacloud/common_tests_collections.rb |    2 +
 tests/deltacloud/firewalls_test.rb           |   28 +++++++++++++++++++++
 tests/deltacloud/load_balancers_test.rb      |   28 +++++++++++++++++++++
 tests/deltacloud/metrics_test.rb             |   28 +++++++++++++++++++++
 4 files changed, 86 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/91112fdd/tests/deltacloud/common_tests_collections.rb
----------------------------------------------------------------------
diff --git a/tests/deltacloud/common_tests_collections.rb b/tests/deltacloud/common_tests_collections.rb
index 717e3a7..a80ae39 100644
--- a/tests/deltacloud/common_tests_collections.rb
+++ b/tests/deltacloud/common_tests_collections.rb
@@ -101,6 +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)
         res = get(test_collection)
         (res.xml/"#{test_collection}/#{test_collection.singularize}").each do |r|
           (r/'name').wont_be_nil
@@ -117,6 +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)
         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/91112fdd/tests/deltacloud/firewalls_test.rb
----------------------------------------------------------------------
diff --git a/tests/deltacloud/firewalls_test.rb b/tests/deltacloud/firewalls_test.rb
new file mode 100644
index 0000000..8a457cd
--- /dev/null
+++ b/tests/deltacloud/firewalls_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 :firewalls
+
+  #Run the 'common' tests for all collections defined in common_tests_collections.rb
+  CommonCollectionsTest::run_collection_and_member_tests_for("firewalls")
+
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/91112fdd/tests/deltacloud/load_balancers_test.rb
----------------------------------------------------------------------
diff --git a/tests/deltacloud/load_balancers_test.rb b/tests/deltacloud/load_balancers_test.rb
new file mode 100644
index 0000000..7de1095
--- /dev/null
+++ b/tests/deltacloud/load_balancers_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 :load_balancers
+
+  #Run the 'common' tests for all collections defined in common_tests_collections.rb
+  CommonCollectionsTest::run_collection_and_member_tests_for("load_balancers")
+
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/91112fdd/tests/deltacloud/metrics_test.rb
----------------------------------------------------------------------
diff --git a/tests/deltacloud/metrics_test.rb b/tests/deltacloud/metrics_test.rb
new file mode 100644
index 0000000..c89780b
--- /dev/null
+++ b/tests/deltacloud/metrics_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 :metrics
+
+  #Run the 'common' tests for all collections defined in common_tests_collections.rb
+  CommonCollectionsTest::run_collection_and_member_tests_for("metrics")
+
+end