summaryrefslogtreecommitdiff
path: root/spec/integration/node/environment_spec.rb
diff options
context:
space:
mode:
authorJosh Partlow <joshua.partlow@puppetlabs.com>2014-09-03 12:44:38 -0700
committerJosh Partlow <joshua.partlow@puppetlabs.com>2014-09-03 12:44:38 -0700
commitd02943ffc0d3fa6e12758ce272bb332e569725c6 (patch)
tree77a911a75036c339ce49e4b44747d6544bfb03f3 /spec/integration/node/environment_spec.rb
parentb2c3dba204522dc243134b90e70117f8ee33b0e8 (diff)
parent45b4945e5c5e79c85168c8a8c5583ea4a33ed50c (diff)
downloadpuppet-d02943ffc0d3fa6e12758ce272bb332e569725c6.tar.gz
Merge remote-tracking branch 'upstream/master' into stable
* upstream/master: (767 commits) (maint) Namespace constant declaration in specs to prevent warnings (maint) Expect test to fail on windows ruby 2.0 x86 (PUP-3069) Fix path expansion for environment.conf test on Win (PUP-2349) Add windows specific expectation for deprecation_warning (PUP-2349) Add windows specific expectation for deprecation_warning (PUP-3069) Clear configuration_file for tests (PUP-3069) Test both future and current parser with default_manifest (PUP-3069) Update default_manifest setting descriptions (PUP-3069) Change restrict_environment_manifest name (PUP-3163) Create and manage the mode of $reportsdir (maint) Clear record of configured deprecated settings (PUP-3069) Add an integration spec for default_manifest (PUP-3069) Halt compile if environment has manifest conflict (PUP-3069) Add spec test for new default options (PUP-3069) Add default manifest settings PUP-3155 Improve spec tests around the PE puppet version (PUP-3153) Guard against nil when closing Uniquefiles (PUP-2984) Remove old installation directory when going from x64 to x86 (PUP-1884) Migrate MSI deps into puppet repo (PUP-3154) Create and manage the mode of $statedir on redhat ...
Diffstat (limited to 'spec/integration/node/environment_spec.rb')
-rwxr-xr-xspec/integration/node/environment_spec.rb32
1 files changed, 24 insertions, 8 deletions
diff --git a/spec/integration/node/environment_spec.rb b/spec/integration/node/environment_spec.rb
index f8a7ace7d..797e4105c 100755
--- a/spec/integration/node/environment_spec.rb
+++ b/spec/integration/node/environment_spec.rb
@@ -80,6 +80,30 @@ describe Puppet::Node::Environment do
end
end
+ shared_examples_for "the environment's initial import in the future" do |settings|
+ it "a manifest referring to a directory invokes recursive parsing of all its files in sorted order" do
+ settings.each do |name, value|
+ Puppet[name] = value
+ end
+
+ # fixture has three files 00_a.pp, 01_b.pp, and 02_c.pp. The 'b' file
+ # depends on 'a' being evaluated first. The 'c' file is empty (to ensure
+ # empty things do not break the directory import).
+ #
+ dirname = my_fixture('sitedir2')
+
+ # Set the manifest to the directory to make it parse and combine them when compiling
+ node = Puppet::Node.new('testnode',
+ :environment => Puppet::Node::Environment.create(:testing, [], dirname))
+
+ catalog = Puppet::Parser::Compiler.compile(node)
+
+ expect(catalog).to have_resource('Class[A]')
+ expect(catalog).to have_resource('Class[B]')
+ expect(catalog).to have_resource('Notify[variables]').with_parameter(:message, "a: 10, b: 10 c: 20")
+ end
+ end
+
describe 'using classic parser' do
it_behaves_like "the environment's initial import",
:parser => 'current',
@@ -92,18 +116,10 @@ describe Puppet::Node::Environment do
describe 'using future parser' do
it_behaves_like "the environment's initial import",
:parser => 'future',
- :evaluator => 'future',
# Turned off because currently future parser turns on the binder which
# causes lookup of facts that are uninitialized and it will fail with
# errors for 'osfamily' etc. This can be turned back on when the binder
# is taken out of the equation.
:strict_variables => false
-
- context 'and evaluator current' do
- it_behaves_like "the environment's initial import",
- :parser => 'future',
- :evaluator => 'current',
- :strict_variables => false
- end
end
end