Sha256: ce41320c688da0329340628d88421683db8a94957d9fd29ccbcc2c54cb4443de

Contents?: true

Size: 1.61 KB

Versions: 71

Compression:

Stored size: 1.61 KB

Contents

#! /usr/bin/env ruby
require 'spec_helper'

require 'puppet/util/instrumentation/listener'
require 'puppet/indirector/instrumentation_data/local'

describe Puppet::Indirector::InstrumentationData::Local do
  it "should be a subclass of the Code terminus" do
    Puppet::Indirector::InstrumentationData::Local.superclass.should equal(Puppet::Indirector::Code)
  end

  it "should be registered with the configuration store indirection" do
    indirection = Puppet::Indirector::Indirection.instance(:instrumentation_data)
    Puppet::Indirector::InstrumentationData::Local.indirection.should equal(indirection)
  end

  it "should have its name set to :local" do
    Puppet::Indirector::InstrumentationData::Local.name.should == :local
  end
end

describe Puppet::Indirector::InstrumentationData::Local do
  before :each do
    Puppet::Util::Instrumentation.stubs(:listener)
    @data = Puppet::Indirector::InstrumentationData::Local.new
    @name = "me"
    @request = stub 'request', :key => @name
  end

  describe "when finding instrumentation data" do
    it "should return an Instrumentation Data instance matching the key" do
    end
  end

  describe "when searching listeners" do
    it "should raise an error" do
      lambda { @data.search(@request) }.should raise_error(Puppet::DevError)
    end
  end

  describe "when saving listeners" do
    it "should raise an error" do
      lambda { @data.save(@request) }.should raise_error(Puppet::DevError)
    end
  end

  describe "when destroying listeners" do
    it "should raise an error" do
      lambda { @data.destroy(@reques) }.should raise_error(Puppet::DevError)
    end
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
puppet-3.8.7 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.7-x86-mingw32 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.7-x64-mingw32 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.6 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.6-x86-mingw32 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.6-x64-mingw32 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.5 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.5-x86-mingw32 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.5-x64-mingw32 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.4 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.4-x86-mingw32 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.4-x64-mingw32 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.3 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.3-x86-mingw32 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.3-x64-mingw32 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.2 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.2-x86-mingw32 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.2-x64-mingw32 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.1 spec/unit/indirector/instrumentation_data/local_spec.rb
puppet-3.8.1-x86-mingw32 spec/unit/indirector/instrumentation_data/local_spec.rb