Sha256: f4b9d81e1f4fb27229ffffc8b48c8e1637db7edecd871d883ed29bdc58a639ca

Contents?: true

Size: 793 Bytes

Versions: 32

Compression:

Stored size: 793 Bytes

Contents

# encoding: UTF-8
require_relative 'spec_helper'

describe 'issue 59' do
  describe 'long running script without output' do
    let(:logged_output) { StringIO.new }
    let(:logger)        { Logging.logger(logged_output) }

    before do
      opts = connection_opts.dup
      opts[:operation_timeout] = 1
      conn = WinRM::Connection.new(opts)
      conn.logger = logger
      @powershell = conn.shell(:powershell)
    end

    it 'should not error' do
      out = @powershell.run('$ProgressPreference="SilentlyContinue";sleep 3; Write-Host "Hello"')

      expect(out).to have_exit_code 0
      expect(out).to have_stdout_match(/Hello/)
      expect(out).to have_no_stderr
      expect(logged_output.string).to match(/retrying receive request/)
    end
  end
end

Version data entries

32 entries across 29 versions & 3 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.2.0.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.1.4.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.1.2.0 vendor/bundle/ruby/2.3.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.1.1.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.0.4.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.0.3.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.0.1.0 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-2.0.0.1 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-1.9.8.1 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb
vagrant-unbundled-1.9.7.1 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/integration/issue_59_spec.rb