summaryrefslogtreecommitdiffstats
path: root/test/language
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-15 21:56:54 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-15 21:56:54 +0000
commit037b7acab071adc727fbed8cfc3cea1c0399c2e2 (patch)
treea659e17c133ddb93664a67dc16bad9d257bf66ce /test/language
parent6fe01cedeb2fe00df62bf63d7f7375d18d0663ca (diff)
Changed the parsedtype definition of exists(), and fixed a few smaller bugs. Last code commit before 0.13.2
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@915 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/language')
-rwxr-xr-xtest/language/interpreter.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/language/interpreter.rb b/test/language/interpreter.rb
index 6e8873986..bd112a8da 100755
--- a/test/language/interpreter.rb
+++ b/test/language/interpreter.rb
@@ -72,8 +72,15 @@ class TestInterpreter < Test::Unit::TestCase
# Only test ldap stuff on luke's network, since that's the only place we
# have data for.
if Facter["domain"].value == "madstop.com"
- def ldapconnect
+ begin
require 'ldap'
+ $haveldap = true
+ rescue LoadError
+ $stderr.puts "Missing ldap; skipping ldap source tests"
+ $haveldap = false
+ end
+ if $haveldap
+ def ldapconnect
@ldap = LDAP::Conn.new("ldap", 389)
@ldap.set_option( LDAP::LDAP_OPT_PROTOCOL_VERSION, 3 )
@@ -154,4 +161,5 @@ class TestInterpreter < Test::Unit::TestCase
}
end
end
+ end
end