~ubuntu-branches/ubuntu/trusty/puppet/trusty

« back to all changes in this revision

Viewing changes to spec/unit/util/network_device/transport/telnet_spec.rb

  • Committer: Package Import Robot
  • Author(s): Tyler Hicks
  • Date: 2012-04-11 03:55:10 UTC
  • Revision ID: package-import@ubuntu.com-20120411035510-n0i86f5adri4b9g2
Tags: 2.7.11-1ubuntu2
* SECURITY UPDATE: Arbitrary file writes via predictable filename usage in
  appdmg and pkgdmg providers (LP: #978708)
  - debian/patches/CVE-2012-1906_CVE-2012-1986_to_CVE-2012-1989.patch
  - CVE-2012-1906
* SECURITY UPDATE: Arbitrary file reads via Filebucket REST requests
  - debian/patches/CVE-2012-1906_CVE-2012-1986_to_CVE-2012-1989.patch
  - CVE-2012-1986
* SECURITY UPDATE: Denial of service via Filebucket text/marshall support
  - debian/patches/CVE-2012-1906_CVE-2012-1986_to_CVE-2012-1989.patch
  - CVE-2012-1987
* SECURITY UPDATE: Arbitrary code execution via Filebucket requests
  - debian/patches/CVE-2012-1906_CVE-2012-1986_to_CVE-2012-1989.patch
  - CVE-2012-1988
* SECURITY UPDATE: Arbritrary file writes via predictable telnet output log
  filename
  - debian/patches/CVE-2012-1906_CVE-2012-1986_to_CVE-2012-1989.patch
  - CVE-2012-1989
* debian/patches/puppet-12844: Re-fetch the patch from upstream since some
  missing pieces cause 'rake spec' to abort immediately

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
describe Puppet::Util::NetworkDevice::Transport::Telnet do
7
7
 
8
8
  before(:each) do
 
9
    TCPSocket.stubs(:open).returns stub_everything('tcp')
9
10
    @transport = Puppet::Util::NetworkDevice::Transport::Telnet.new()
10
11
  end
11
12
 
13
14
    @transport.should_not be_handles_login
14
15
  end
15
16
 
 
17
  it "should not open any files" do
 
18
    File.expects(:open).never
 
19
    @transport.host = "localhost"
 
20
    @transport.port = 23
 
21
 
 
22
    @transport.connect
 
23
  end
 
24
 
16
25
  it "should connect to the given host and port" do
17
26
    Net::Telnet.expects(:new).with { |args| args["Host"] == "localhost" && args["Port"] == 23 }.returns stub_everything
18
27
    @transport.host = "localhost"