Sha256: e089c95834df79e9f4f6eea28482cb62e8ef0cff22b2c25506556548f69519e4
Contents?: true
Size: 991 Bytes
Versions: 6
Compression:
Stored size: 991 Bytes
Contents
require "test_plugin_helper" module ForemanRemoteExecution class RunProxyCommandTest < ActiveSupport::TestCase include Dynflow::Testing let(:proxy) { FactoryGirl.build(:smart_proxy) } let(:hostname) { 'myhost.example.com' } let(:script) { 'ping -c 5 redhat.com' } let(:action) do create_and_plan_action(Actions::RemoteExecution::RunProxyCommand, proxy, hostname, script) end it 'plans for running the command action on server' do assert_run_phase action, { :hostname => hostname, :script => script, :proxy_url => proxy.url, :effective_user => nil } end it 'sends to command to ssh provider' do action.proxy_action_name.must_equal 'Proxy::RemoteExecution::Ssh::CommandAction' end it "doesn't block on failure" do action.rescue_strategy.must_equal ::Dynflow::Action::Rescue::Skip end end end
Version data entries
6 entries across 6 versions & 1 rubygems