deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dko...@apache.org
Subject [7/9] git commit: CIMI: added test to ensure spec order of CEP elements
Date Tue, 09 Jul 2013 06:25:13 GMT
CIMI: added test to ensure spec order of CEP elements


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

Branch: refs/heads/master
Commit: 58d1f3640e3069cf13328f554869da3fcaf08076
Parents: cacd655
Author: Dies Koper <diesk@fast.au.fujitsu.com>
Authored: Thu Jul 4 22:13:25 2013 +1000
Committer: Dies Koper <diesk@fast.au.fujitsu.com>
Committed: Thu Jul 4 22:13:25 2013 +1000

----------------------------------------------------------------------
 server/tests/cimi/collections/cloud_entry_point_test.rb | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/58d1f364/server/tests/cimi/collections/cloud_entry_point_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/cimi/collections/cloud_entry_point_test.rb b/server/tests/cimi/collections/cloud_entry_point_test.rb
index e132c4b..d8e812d 100644
--- a/server/tests/cimi/collections/cloud_entry_point_test.rb
+++ b/server/tests/cimi/collections/cloud_entry_point_test.rb
@@ -29,6 +29,15 @@ describe CIMI::Collections::CloudEntryPoint do
     json['id'].wont_be_empty
   end
 
+  it 'advertises CIMI collections in spec order' do
+    get root_url + '/cloudEntryPoint?format=json'
+    json.wont_be_empty
+
+    resources_with_href = ['resourceMetadata', 'systems', 'systemTemplates', 'machines',
'machineTemplates', 'machineConfigs', 'machineImages', 'credentials', 'credentialTemplates',
'volumes', 'volumeTemplates', 'volumeConfigs', 'volumeImages', 'networks', 'networkTemplates',
'networkConfigs', 'networkPorts', 'networkPortTemplates', 'networkPortConfigs', 'addresses',
'addressTemplates', 'forwardingGroups', 'forwardingGroupTemplates']
+
+    (resources_with_href & json.keys).must_equal(json.keys & resources_with_href)
+  end
+
   it 'allow to force authentication using force_auth parameter in URI' do
     get root_url + '/cloudEntryPoint?force_auth=1'
     status.must_equal 401


Mime
View raw message