From: Ronelle Landy <[email protected]>

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

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
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
diff --git a/tests/cimi/test_helper.rb b/tests/cimi/test_helper.rb
index 45ff6a3..6cdb3fa 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"]
+        if (not name.nil?) && @hash.include?(name)
+          @hash["cimi"].update(@hash[name])
+        end
       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"]
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"
-- 
1.7.7.6

Reply via email to