summaryrefslogtreecommitdiffstats
path: root/spec/integration/file_serving
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-10-18 20:47:56 -0500
committerLuke Kanies <luke@madstop.com>2007-10-18 20:47:56 -0500
commitfc607513faa54d64186a674a36d81ea010745569 (patch)
treed409b20c752cdb50e2fe72e8f6ef815951c360b4 /spec/integration/file_serving
parent64c6700bc7530f1213e124d248cc176a7cfe6180 (diff)
downloadpuppet-fc607513faa54d64186a674a36d81ea010745569.tar.gz
puppet-fc607513faa54d64186a674a36d81ea010745569.tar.xz
puppet-fc607513faa54d64186a674a36d81ea010745569.zip
I've now split the file-serving termini into two separate types (in
addition to Rest): A local terminus that just uses direct file paths, and a mounts terminus that uses the file server to figure out what the path should be. It looks like it also makes sense to split the 'mounts' terminus further, so there is a 'modules' terminus used to look files up in the terminus. I've added some integration tests to verify that everything is hooked together correctly. Lastly, I added a directory for shared behaviours. There's a ton of duplication in this setup, because the Content and Metadata classes behave almost but not quite identically across the board.
Diffstat (limited to 'spec/integration/file_serving')
-rwxr-xr-xspec/integration/file_serving/content.rb18
-rwxr-xr-xspec/integration/file_serving/metadata.rb19
2 files changed, 37 insertions, 0 deletions
diff --git a/spec/integration/file_serving/content.rb b/spec/integration/file_serving/content.rb
new file mode 100755
index 000000000..aee2a9f2d
--- /dev/null
+++ b/spec/integration/file_serving/content.rb
@@ -0,0 +1,18 @@
+#!/usr/bin/env ruby
+#
+# Created by Luke Kanies on 2007-10-18.
+# Copyright (c) 2007. All rights reserved.
+
+require File.dirname(__FILE__) + '/../../spec_helper'
+
+require 'puppet/file_serving/content'
+require 'shared_behaviours/file_serving'
+
+describe Puppet::FileServing::Content, " when finding files" do
+ it_should_behave_like "Puppet::FileServing::Files"
+
+ before do
+ @test_class = Puppet::FileServing::Content
+ @indirection = Puppet::FileServing::Content.indirection
+ end
+end
diff --git a/spec/integration/file_serving/metadata.rb b/spec/integration/file_serving/metadata.rb
new file mode 100755
index 000000000..5600365f1
--- /dev/null
+++ b/spec/integration/file_serving/metadata.rb
@@ -0,0 +1,19 @@
+#!/usr/bin/env ruby
+#
+# Created by Luke Kanies on 2007-10-18.
+# Copyright (c) 2007. All rights reserved.
+
+require File.dirname(__FILE__) + '/../../spec_helper'
+
+require 'puppet/file_serving/metadata'
+require 'shared_behaviours/file_serving'
+
+describe Puppet::FileServing::Metadata, " when finding files" do
+ it_should_behave_like "Puppet::FileServing::Files"
+
+ before do
+ @test_class = Puppet::FileServing::Metadata
+ @indirection = Puppet::FileServing::Metadata.indirection
+ end
+end
+