You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by lu...@apache.org on 2013/04/25 02:10:20 UTC
[3/5] git commit: CIMI tests (test_helper): make poll_state work for
both machines and systems
CIMI tests (test_helper): make poll_state work for both machines and systems
Any model that has a state can now be used with poll_state
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/119a7e10
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/119a7e10
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/119a7e10
Branch: refs/heads/master
Commit: 119a7e10d6c2dabb26807d3a5a2d37232a1cbe60
Parents: 44eb1ad
Author: David Lutterkort <lu...@redhat.com>
Authored: Wed Apr 24 14:04:12 2013 -0700
Committer: David Lutterkort <lu...@redhat.com>
Committed: Wed Apr 24 14:04:12 2013 -0700
----------------------------------------------------------------------
tests/cimi/test_helper.rb | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/119a7e10/tests/cimi/test_helper.rb
----------------------------------------------------------------------
diff --git a/tests/cimi/test_helper.rb b/tests/cimi/test_helper.rb
index 9b3c81d..316b461 100644
--- a/tests/cimi/test_helper.rb
+++ b/tests/cimi/test_helper.rb
@@ -256,12 +256,12 @@ module CIMI::Test::Methods
log.debug "/#{method.to_s.upcase} #{absolute_url(path)}"
end
- def poll_state(machine, state)
- while not machine.state.upcase.eql?(state)
+ def poll_state(res, state)
+ while not res.state.upcase.eql?(state)
puts state
- puts 'waiting for machine to be: ' + state.to_s()
+ log.info "waiting for resource #{res.id} to be #{state}"
sleep(10)
- machine = machine(:refetch => true)
+ res = fetch(res.id)
end
end