summaryrefslogtreecommitdiffstats
path: root/spec/integration/file_serving
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration/file_serving')
-rwxr-xr-xspec/integration/file_serving/fileset.rb14
-rwxr-xr-xspec/integration/file_serving/terminus_helper.rb22
2 files changed, 36 insertions, 0 deletions
diff --git a/spec/integration/file_serving/fileset.rb b/spec/integration/file_serving/fileset.rb
new file mode 100755
index 000000000..80bf0f376
--- /dev/null
+++ b/spec/integration/file_serving/fileset.rb
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+
+require File.dirname(__FILE__) + '/../../spec_helper'
+
+require 'puppet/file_serving/fileset'
+
+describe Puppet::FileServing::Fileset do
+ it "should be able to recurse on a single file" do
+ @path = Tempfile.new("fileset_integration")
+
+ fileset = Puppet::FileServing::Fileset.new(@path.path)
+ lambda { fileset.files }.should_not raise_error
+ end
+end
diff --git a/spec/integration/file_serving/terminus_helper.rb b/spec/integration/file_serving/terminus_helper.rb
new file mode 100755
index 000000000..7d2587af1
--- /dev/null
+++ b/spec/integration/file_serving/terminus_helper.rb
@@ -0,0 +1,22 @@
+#!/usr/bin/env ruby
+
+require File.dirname(__FILE__) + '/../../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, :recurse => true)
+
+ tester = TerminusHelperIntegrationTester.new
+ lambda { tester.path2instances(request, @path.path) }.should_not raise_error
+ end
+end