deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject [1/3] git commit: CIMI - tests - adding provider detection
Date Thu, 13 Dec 2012 00:59:50 GMT
Updated Branches:
  refs/heads/master 6f530d0e0 -> 87c1fb67e


CIMI - tests - adding provider detection

TrackedAt: http://tracker.deltacloud.org/patch/9c1a87fde5600b48f80aa5ef3af84467d38f0366


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

Branch: refs/heads/master
Commit: 87c1fb67e4206a675bd2463e8ef755528bf7cd1d
Parents: 40f44fb
Author: Ronelle Landy <rlandy@redhat.com>
Authored: Wed Dec 12 17:27:16 2012 -0500
Committer: David Lutterkort <lutter@redhat.com>
Committed: Wed Dec 12 16:58:10 2012 -0800

----------------------------------------------------------------------
 tests/cimi/part2_test.rb  |    2 +-
 tests/cimi/part3_test.rb  |    2 +-
 tests/cimi/test_helper.rb |    7 +++++++
 tests/config.yaml         |   10 ++++------
 4 files changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/87c1fb67/tests/cimi/part2_test.rb
----------------------------------------------------------------------
diff --git a/tests/cimi/part2_test.rb b/tests/cimi/part2_test.rb
index 1be48f0..9bb0b94 100644
--- a/tests/cimi/part2_test.rb
+++ b/tests/cimi/part2_test.rb
@@ -76,6 +76,6 @@ end
     else
       machine = CIMI::Model::Machinemachine.new(:id => resp.headers[:location])
     end
-    @@created_resources[:machines] << machine
+    @@created_resources[:machines] << machine[:id]
   end
 end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/87c1fb67/tests/cimi/part3_test.rb
----------------------------------------------------------------------
diff --git a/tests/cimi/part3_test.rb b/tests/cimi/part3_test.rb
index 0cf80d7..50e7aae 100644
--- a/tests/cimi/part3_test.rb
+++ b/tests/cimi/part3_test.rb
@@ -95,7 +95,7 @@ class CreateNewMachineFromMachineTemplate < CIMI::Test::Spec
     else
       machine = CIMI::Model::Machinemachine.new(:id => resp.headers[:location])
     end
-    @@created_resources[:machines] << machine
+    @@created_resources[:machines] << machine[:id]
   end
 
 end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/87c1fb67/tests/cimi/test_helper.rb
----------------------------------------------------------------------
diff --git a/tests/cimi/test_helper.rb b/tests/cimi/test_helper.rb
index 45ff6a3..6be43c1 100644
--- a/tests/cimi/test_helper.rb
+++ b/tests/cimi/test_helper.rb
@@ -34,6 +34,9 @@ module CIMI
       def initialize
         @hash = Deltacloud::Test::yaml_config
         @cimi = @hash["cimi"]
+        # Pull in settings for driver reported by server, if any
+        # Only relevant when running against Deltacloud
+        @hash["cimi"].update(@hash[name] || {})
       end
 
       def cep_url
@@ -44,6 +47,10 @@ module CIMI
         xml.xpath("/c:CloudEntryPoint/c:baseURI", ns).text
       end
 
+      def name
+        xml.xpath("/c:CloudEntryPoint/c:name", ns).text
+      end
+
       def basic_auth(u = nil, p = nil)
         u ||= @cimi["user"]
         p ||= @cimi["password"]

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/87c1fb67/tests/config.yaml
----------------------------------------------------------------------
diff --git a/tests/config.yaml b/tests/config.yaml
index b567923..8c90dc6 100644
--- a/tests/config.yaml
+++ b/tests/config.yaml
@@ -4,6 +4,10 @@ api_url: "http://localhost:3001/api"
 mock:
   user: "mockuser"
   password: "mockpassword"
+  preferred:
+    machineImage: "img2"
+    machineConfig: "m1-small"
+    volumeConfig: "2"
 #OPENSTACK DRIVER CONFIG
 openstack:
   user:
@@ -44,9 +48,3 @@ fgcp:
 # CIMI testing
 cimi:
   cep: "http://localhost:3001/cimi/cloudEntryPoint"
-  user: "mockuser"
-  password: "mockpassword"
-  preferred:
-   machineImage: "img2"
-   machineConfig: "m1-small"
-   volumeConfig: "2"


Mime
View raw message