From fc607513faa54d64186a674a36d81ea010745569 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 18 Oct 2007 20:47:56 -0500 Subject: 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. --- spec/integration/file_serving/content.rb | 18 ++++++++++++++++++ spec/integration/file_serving/metadata.rb | 19 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 spec/integration/file_serving/content.rb create mode 100755 spec/integration/file_serving/metadata.rb (limited to 'spec/integration/file_serving') 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 + -- cgit