File: terminus_helper_spec.rb

package info (click to toggle)
puppet 5.5.22-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 21,316 kB
  • sloc: ruby: 254,925; sh: 1,608; xml: 219; makefile: 153; sql: 103
file content (20 lines) | stat: -rw-r--r-- 596 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'spec_helper'

require 'puppet/file_serving/terminus_helper'

class TerminusHelperIntegrationTester
  include Puppet::FileServing::TerminusHelper
  def model
    Puppet::FileServing::Metadata
  end
end

describe Puppet::FileServing::TerminusHelper do
  it "should be able to recurse on a single file" do
    @path = Tempfile.new("fileset_integration")
    request = Puppet::Indirector::Request.new(:metadata, :find, @path.path, nil, :recurse => true)

    tester = TerminusHelperIntegrationTester.new
    expect { tester.path2instances(request, @path.path) }.not_to raise_error
  end
end