deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [4/4] git commit: CIMI - Tests - review corrections for set 329
Date Fri, 22 Feb 2013 16:15:26 GMT
Updated Branches:
  refs/heads/master bb6aed453 -> 83d45c5ea


CIMI - Tests - review corrections for set 329

TrackedAt: http://tracker.deltacloud.org/patch/bd302075e2484fa79794310ca857b351e963cdcd


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

Branch: refs/heads/master
Commit: 83d45c5ea0d4ebb8a97b15bf9aa3c964ad98dd6e
Parents: d5c0ad7
Author: Ronelle Landy <rlandy@redhat.com>
Authored: Wed Feb 20 16:59:35 2013 -0500
Committer: marios <marios@redhat.com>
Committed: Fri Feb 22 18:06:30 2013 +0200

----------------------------------------------------------------------
 tests/cimi/rmd4_test.rb   |    2 +-
 tests/cimi/test_helper.rb |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/83d45c5e/tests/cimi/rmd4_test.rb
----------------------------------------------------------------------
diff --git a/tests/cimi/rmd4_test.rb b/tests/cimi/rmd4_test.rb
index 9375661..1d721fc 100644
--- a/tests/cimi/rmd4_test.rb
+++ b/tests/cimi/rmd4_test.rb
@@ -137,11 +137,11 @@ class MachinesRMDInitialStates < CIMI::Test::Spec
       it "should have a state equal to the specified initial state" do
         machine = get(@@rmd4_created_machines[chosen_initial_state], :accept=>:json)
         5.times do |j|
-          machine = get(@@rmd4_created_machines[chosen_initial_state], :accept=>:json)
           break if machine.json["state"].upcase.eql?(chosen_initial_state.upcase)
           puts machine.json["state"]
           puts 'waiting for machine to be: ' + chosen_initial_state
           sleep(5)
+          machine = get(@@rmd4_created_machines[chosen_initial_state], :accept=>:json)
         end unless machine.json["state"].upcase.eql?(chosen_initial_state.upcase)
 
         machine.json["state"].upcase.must_equal chosen_initial_state

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/83d45c5e/tests/cimi/test_helper.rb
----------------------------------------------------------------------
diff --git a/tests/cimi/test_helper.rb b/tests/cimi/test_helper.rb
index 37f0166..5cfceb6 100644
--- a/tests/cimi/test_helper.rb
+++ b/tests/cimi/test_helper.rb
@@ -137,7 +137,7 @@ module CIMI::Test::Methods
       unless rmd_coll.json["resourceMetadata"][collection_index][rmd_type].nil?()
         rmd_index = rmd_coll.json["resourceMetadata"][collection_index][rmd_type].index {|rmd|
rmd["uri"] == rmd_uri}
       end
-      raise "Couldn't discover the #{rmd_uri} URI" if rmd_index.nil?() || rmd_index.empty?()
+      raise "Couldn't discover the #{rmd_uri} URI" unless rmd_index
     end
 
     def get_a(cep, item)


Mime
View raw message