From: Ronelle Landy <rla...@redhat.com> --- 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(-) create mode 100644 tests/deltacloud/firewalls_test.rb create mode 100644 tests/deltacloud/load_balancers_test.rb create mode 100644 tests/deltacloud/metrics_test.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]}") 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 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 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 -- 1.7.7.6