summaryrefslogtreecommitdiffstats
path: root/spec/integration/parser/functions/include.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@puppetlabs.com>2010-05-14 13:30:43 -0700
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit61a719f41c5448ca9ab7bdbd6a05f6c97ee80b7f (patch)
tree4f4534536aac89bb713f6f42852950f3c4cde6b6 /spec/integration/parser/functions/include.rb
parentd13f8ac4d5b8e4cf677c6c04fe875630216d6303 (diff)
downloadpuppet-61a719f41c5448ca9ab7bdbd6a05f6c97ee80b7f.tar.gz
puppet-61a719f41c5448ca9ab7bdbd6a05f6c97ee80b7f.tar.xz
puppet-61a719f41c5448ca9ab7bdbd6a05f6c97ee80b7f.zip
Adding #2658 - Adding support for run stages
This allows you to specify a run stage for either a class or a resource. By default, all classes get directly added to the 'main' stage. You can create new stages as resources: stage { [pre, post]: } To order stages, use standard relationships: stage { pre: before => Stage[main] } Or use the new relationship syntax: stage { pre: } -> Stage[main] -> stage { post: } Then use the new class parameters to specify a stage: class { foo: stage => pre } If you set a stage on an individual resource, it will fail; stages can only be set on class resources. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Diffstat (limited to 'spec/integration/parser/functions/include.rb')
-rwxr-xr-xspec/integration/parser/functions/include.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/spec/integration/parser/functions/include.rb b/spec/integration/parser/functions/include.rb
deleted file mode 100755
index f84d43276..000000000
--- a/spec/integration/parser/functions/include.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env ruby
-
-require File.dirname(__FILE__) + '/../../../spec_helper'
-
-describe "The include function" do
- before :each do
- @node = Puppet::Node.new("mynode")
- @compiler = Puppet::Parser::Compiler.new(@node)
- @compiler.send(:evaluate_main)
- @scope = @compiler.topscope
- # preload our functions
- Puppet::Parser::Functions.function(:include)
- Puppet::Parser::Functions.function(:require)
- end
-
- it "should add a containment relationship between the 'included' class and our class" do
- @compiler.known_resource_types.add Puppet::Resource::Type.new(:hostclass, "includedclass")
-
- @scope.function_include("includedclass")
-
- klass_resource = @compiler.findresource(:class,"includedclass")
- klass_resource.should be_instance_of(Puppet::Parser::Resource)
- @compiler.catalog.should be_edge(@scope.resource, klass_resource)
- end
-end