summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/functions
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-03-18 14:41:30 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-03-18 14:41:30 -0700
commit7e71840e29cb09c772668a51ada3cab1e319e50f (patch)
tree9b0c15f2c93fa6c60364bd78dcbe17a40b740a23 /spec/unit/parser/functions
parentea348761df0b5297dbac50c7f1c48d22746524fa (diff)
parent2ae88067492f7922a3c4d53b6fa8c849b193f76a (diff)
downloadpuppet-7e71840e29cb09c772668a51ada3cab1e319e50f.tar.gz
puppet-7e71840e29cb09c772668a51ada3cab1e319e50f.tar.xz
puppet-7e71840e29cb09c772668a51ada3cab1e319e50f.zip
Merge branch 'next'
* next: (198 commits) (#6722) load all functions before testing... Updated CHANGELOG for 2.6.7rc1 (#5073) Download plugins even if you're filtering on tags Fix #5610: Prevent unnecessary RAL lookups Revert "Merge branch 'ticket/2.6.x/5605' of git://github.com/stschulte/puppet into 2.6.next" (#6723) Fix withenv environment restoration bug (#6689) Remove extraneous include of Puppet::Util in InventoryActiveRecord Remove extra trailing whitespace from lib/puppet/resource.rb (#5428) More fully "stub" Puppet::Resource::Reference for use with storedconfigs (#6707) Fix typo in rest_authconfig.rb (#6689) Make inventory_active_record terminus search quickly (#5479) Test that we auto-require the zone dataset. (#5479) Autorequire zfs filesystem when zone dataset is configured (#5392) Give a better error when realizing a non-existant resource (#2645) Adding a less-stubby test to verify the "system" attribute's behavior Update CHANGELOG for 2.6.6 maint: Remove serialization of InventoryFact values maint: Rename InventoryHost to InventoryNode (#6441) Add mount fixture for AIX's /etc/filesystems Fixed #2645 - Added support for creating system users ...
Diffstat (limited to 'spec/unit/parser/functions')
-rwxr-xr-xspec/unit/parser/functions/defined_spec.rb3
-rwxr-xr-xspec/unit/parser/functions/extlookup_spec.rb5
-rwxr-xr-x[-rw-r--r--]spec/unit/parser/functions/fqdn_rand_spec.rb3
-rwxr-xr-xspec/unit/parser/functions/generate_spec.rb3
-rwxr-xr-x[-rw-r--r--]spec/unit/parser/functions/include_spec.rb3
-rwxr-xr-xspec/unit/parser/functions/inline_template_spec.rb5
-rwxr-xr-xspec/unit/parser/functions/realize_spec.rb3
-rwxr-xr-xspec/unit/parser/functions/regsubst_spec.rb3
-rwxr-xr-xspec/unit/parser/functions/require_spec.rb3
-rwxr-xr-xspec/unit/parser/functions/shellquote_spec.rb3
-rwxr-xr-xspec/unit/parser/functions/split_spec.rb3
-rwxr-xr-xspec/unit/parser/functions/sprintf_spec.rb3
-rwxr-xr-xspec/unit/parser/functions/tag_spec.rb3
-rwxr-xr-xspec/unit/parser/functions/template_spec.rb5
-rwxr-xr-xspec/unit/parser/functions/versioncmp_spec.rb3
15 files changed, 47 insertions, 4 deletions
diff --git a/spec/unit/parser/functions/defined_spec.rb b/spec/unit/parser/functions/defined_spec.rb
index 0dd1dadb8..0113c3233 100755
--- a/spec/unit/parser/functions/defined_spec.rb
+++ b/spec/unit/parser/functions/defined_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the 'defined' function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
Puppet::Node::Environment.stubs(:current).returns(nil)
diff --git a/spec/unit/parser/functions/extlookup_spec.rb b/spec/unit/parser/functions/extlookup_spec.rb
index a476dc844..46cd3cc27 100755
--- a/spec/unit/parser/functions/extlookup_spec.rb
+++ b/spec/unit/parser/functions/extlookup_spec.rb
@@ -4,12 +4,13 @@ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
require 'tempfile'
describe "the extlookup function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
@scope = Puppet::Parser::Scope.new
-
@scope.stubs(:environment).returns(Puppet::Node::Environment.new('production'))
- Puppet::Parser::Functions.function("extlookup")
end
it "should exist" do
diff --git a/spec/unit/parser/functions/fqdn_rand_spec.rb b/spec/unit/parser/functions/fqdn_rand_spec.rb
index 151ebac9a..be2e6fa76 100644..100755
--- a/spec/unit/parser/functions/fqdn_rand_spec.rb
+++ b/spec/unit/parser/functions/fqdn_rand_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the fqdn_rand function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
@scope = Puppet::Parser::Scope.new
diff --git a/spec/unit/parser/functions/generate_spec.rb b/spec/unit/parser/functions/generate_spec.rb
index 12f454210..d25015b56 100755
--- a/spec/unit/parser/functions/generate_spec.rb
+++ b/spec/unit/parser/functions/generate_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the generate function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
@scope = Puppet::Parser::Scope.new
diff --git a/spec/unit/parser/functions/include_spec.rb b/spec/unit/parser/functions/include_spec.rb
index 67227e7d9..cfaadfbb6 100644..100755
--- a/spec/unit/parser/functions/include_spec.rb
+++ b/spec/unit/parser/functions/include_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the 'include' function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
Puppet::Node::Environment.stubs(:current).returns(nil)
diff --git a/spec/unit/parser/functions/inline_template_spec.rb b/spec/unit/parser/functions/inline_template_spec.rb
index 36d53778d..712c68c69 100755
--- a/spec/unit/parser/functions/inline_template_spec.rb
+++ b/spec/unit/parser/functions/inline_template_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the inline_template function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
@scope = Puppet::Parser::Scope.new
@@ -56,4 +59,4 @@ describe "the inline_template function" do
lambda { @scope.function_inline_template("1") }.should raise_error(Puppet::ParseError)
end
-end \ No newline at end of file
+end
diff --git a/spec/unit/parser/functions/realize_spec.rb b/spec/unit/parser/functions/realize_spec.rb
index 899f69b01..3106c42b6 100755
--- a/spec/unit/parser/functions/realize_spec.rb
+++ b/spec/unit/parser/functions/realize_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the realize function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
@collector = stub_everything 'collector'
diff --git a/spec/unit/parser/functions/regsubst_spec.rb b/spec/unit/parser/functions/regsubst_spec.rb
index 09aa92d28..1fb8e410c 100755
--- a/spec/unit/parser/functions/regsubst_spec.rb
+++ b/spec/unit/parser/functions/regsubst_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the regsubst function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
@scope = Puppet::Parser::Scope.new
diff --git a/spec/unit/parser/functions/require_spec.rb b/spec/unit/parser/functions/require_spec.rb
index 4afbd5a63..edcbc4ae6 100755
--- a/spec/unit/parser/functions/require_spec.rb
+++ b/spec/unit/parser/functions/require_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the require function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
@catalog = stub 'catalog'
diff --git a/spec/unit/parser/functions/shellquote_spec.rb b/spec/unit/parser/functions/shellquote_spec.rb
index c8b0d650d..55302b97b 100755
--- a/spec/unit/parser/functions/shellquote_spec.rb
+++ b/spec/unit/parser/functions/shellquote_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the shellquote function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
@scope = Puppet::Parser::Scope.new
diff --git a/spec/unit/parser/functions/split_spec.rb b/spec/unit/parser/functions/split_spec.rb
index 39710003b..b892a5c2a 100755
--- a/spec/unit/parser/functions/split_spec.rb
+++ b/spec/unit/parser/functions/split_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the split function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
@scope = Puppet::Parser::Scope.new
diff --git a/spec/unit/parser/functions/sprintf_spec.rb b/spec/unit/parser/functions/sprintf_spec.rb
index 4f29012b3..69fbb5e97 100755
--- a/spec/unit/parser/functions/sprintf_spec.rb
+++ b/spec/unit/parser/functions/sprintf_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the sprintf function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
@scope = Puppet::Parser::Scope.new
diff --git a/spec/unit/parser/functions/tag_spec.rb b/spec/unit/parser/functions/tag_spec.rb
index e9b5122c7..b6bb45252 100755
--- a/spec/unit/parser/functions/tag_spec.rb
+++ b/spec/unit/parser/functions/tag_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the 'tag' function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
@scope = Puppet::Parser::Scope.new
diff --git a/spec/unit/parser/functions/template_spec.rb b/spec/unit/parser/functions/template_spec.rb
index 9dd5cc947..7eaf3554d 100755
--- a/spec/unit/parser/functions/template_spec.rb
+++ b/spec/unit/parser/functions/template_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the template function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
@scope = Puppet::Parser::Scope.new
@@ -59,4 +62,4 @@ describe "the template function" do
lambda { @scope.function_template("1") }.should raise_error(Puppet::ParseError)
end
-end \ No newline at end of file
+end
diff --git a/spec/unit/parser/functions/versioncmp_spec.rb b/spec/unit/parser/functions/versioncmp_spec.rb
index 2bc7be801..ddc79cd85 100755
--- a/spec/unit/parser/functions/versioncmp_spec.rb
+++ b/spec/unit/parser/functions/versioncmp_spec.rb
@@ -3,6 +3,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe "the versioncmp function" do
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ end
before :each do
@scope = Puppet::Parser::Scope.new