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

« back to all changes in this revision

Viewing changes to spec/unit/application/inspect_spec.rb

  • Committer: Package Import Robot
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2011-10-22 14:08:22 UTC
  • mfrom: (1.1.25) (3.1.32 sid)
  • Revision ID: package-import@ubuntu.com-20111022140822-odxde5lohc45yhuz
Tags: 2.7.6-1
* New upstream release (CVE-2011-3872)
* Remove cherry-picked "groupadd_aix_warning" patch
* Install all new manpages

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
  before :each do
14
14
    @inspect = Puppet::Application[:inspect]
 
15
    @inspect.preinit
 
16
  end
 
17
 
 
18
  it "should operate in agent run_mode" do
 
19
    @inspect.class.run_mode.name.should == :agent
15
20
  end
16
21
 
17
22
  describe "during setup" do
98
103
      catalog = Puppet::Resource::Catalog.new
99
104
      file = Tempfile.new("foo")
100
105
      resource = Puppet::Resource.new(:file, file.path, :parameters => {:audit => "all"})
 
106
      file.close
101
107
      file.delete
102
108
      catalog.add_resource(resource)
103
109
      Puppet::Resource::Catalog::Yaml.any_instance.stubs(:find).returns(catalog)
142
148
          @inspect.run_command
143
149
        end
144
150
 
145
 
        it "should not send unreadable files" do
 
151
        it "should not send unreadable files", :unless => Puppet.features.microsoft_windows? do
146
152
          File.open(@file, 'w') { |f| f.write('stuff') }
147
153
          File.chmod(0, @file)
148
154
          Puppet::FileBucketFile::Rest.any_instance.expects(:head).never