deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject git commit: Mock: Add test to cover run_on_instance method
Date Fri, 10 Aug 2012 11:53:34 GMT
Updated Branches:
  refs/heads/master 78c0f2751 -> f01037149


Mock: Add test to cover run_on_instance method


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

Branch: refs/heads/master
Commit: f010371496d84d07aef1987813f31e8aec4c0f21
Parents: 78c0f27
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Fri Aug 10 13:53:25 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Fri Aug 10 13:53:25 2012 +0200

----------------------------------------------------------------------
 server/tests/drivers/mock/instances_test.rb |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f0103714/server/tests/drivers/mock/instances_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/mock/instances_test.rb b/server/tests/drivers/mock/instances_test.rb
index fcb690a..a104216 100644
--- a/server/tests/drivers/mock/instances_test.rb
+++ b/server/tests/drivers/mock/instances_test.rb
@@ -96,4 +96,11 @@ describe 'MockDriver Instances' do
     @driver.instance(:id => instance.id).must_be_nil
   end
 
+  it 'must support run_on_instance' do
+    run_cmd = @driver.run_on_instance(:cmd => 'uname', :port => '22', :private_key
=> '123', :ip => '127.0.0.1')
+    run_cmd.body.must_equal 'This is where the output would appear if this were not a mock
provider'
+    run_cmd.ssh.must_be_kind_of Deltacloud::Drivers::Mock::MockDriver::Mock_ssh
+    run_cmd.ssh.command.must_equal 'uname'
+  end
+
 end


Mime
View raw message