summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-08-25 15:54:06 -0500
committerLuke Kanies <luke@madstop.com>2007-08-25 15:54:06 -0500
commit37f0eed9657810c1b9e1d6383e6d6ebb027aff2f (patch)
tree4a99038864044be35e38cd52bba495883cc36344 /test
parentdeb0107ed945c25776d10f9e9b9d721b69ec3478 (diff)
downloadpuppet-37f0eed9657810c1b9e1d6383e6d6ebb027aff2f.tar.gz
puppet-37f0eed9657810c1b9e1d6383e6d6ebb027aff2f.tar.xz
puppet-37f0eed9657810c1b9e1d6383e6d6ebb027aff2f.zip
Renaming the "configuration" object to "compile", because it is only a transitional object and I want the real "configuration" object to be the thing that I pass from the server to the client; it will be a subclass of GRATR::Digraph.
Diffstat (limited to 'test')
-rwxr-xr-xtest/language/compile.rb (renamed from test/language/configuration.rb)30
-rw-r--r--test/lib/puppettest/parsertesting.rb4
2 files changed, 17 insertions, 17 deletions
diff --git a/test/language/configuration.rb b/test/language/compile.rb
index 409d4ca1d..90cbc292e 100755
--- a/test/language/configuration.rb
+++ b/test/language/compile.rb
@@ -5,14 +5,14 @@ $:.unshift("../lib").unshift("../../lib") if __FILE__ =~ /\.rb$/
require 'mocha'
require 'puppettest'
require 'puppettest/parsertesting'
-require 'puppet/parser/configuration'
+require 'puppet/parser/compile'
-# Test our configuration object.
-class TestConfiguration < Test::Unit::TestCase
+# Test our compile object.
+class TestCompile < Test::Unit::TestCase
include PuppetTest
include PuppetTest::ParserTesting
- Config = Puppet::Parser::Configuration
+ Compile = Puppet::Parser::Compile
Scope = Puppet::Parser::Scope
Node = Puppet::Network::Handler.handler(:node)
SimpleNode = Puppet::Node
@@ -32,13 +32,13 @@ class TestConfiguration < Test::Unit::TestCase
else
node = mknode
end
- @config = Config.new(node, mkparser, options)
+ @config = Compile.new(node, mkparser, options)
end
def test_initialize
config = nil
assert_nothing_raised("Could not init config with all required options") do
- config = Config.new("foo", "parser")
+ config = Compile.new("foo", "parser")
end
assert_equal("foo", config.node, "Did not set node correctly")
@@ -49,7 +49,7 @@ class TestConfiguration < Test::Unit::TestCase
# Now try it with some options
assert_nothing_raised("Could not init config with extra options") do
- config = Config.new("foo", "parser", :ast_nodes => false)
+ config = Compile.new("foo", "parser", :ast_nodes => false)
end
assert_equal(false, config.ast_nodes?, "Did not set ast_nodes? correctly")
@@ -122,8 +122,8 @@ class TestConfiguration < Test::Unit::TestCase
assert(graph.edge?(config.topscope, subscope), "An edge between top scope and subscope was not added")
# Make sure a scope can find its parent.
- assert(config.parent(subscope), "Could not look up parent scope on configuration")
- assert_equal(config.topscope.object_id, config.parent(subscope).object_id, "Did not get correct parent scope from configuration")
+ assert(config.parent(subscope), "Could not look up parent scope on compile")
+ assert_equal(config.topscope.object_id, config.parent(subscope).object_id, "Did not get correct parent scope from compile")
assert_equal(config.topscope.object_id, subscope.parent.object_id, "Scope did not correctly retrieve its parent scope")
# Now create another, this time specifying options
@@ -136,8 +136,8 @@ class TestConfiguration < Test::Unit::TestCase
assert(graph.edge?(subscope, another), "An edge between parent scope and second subscope was not added")
# Make sure it can find its parent.
- assert(config.parent(another), "Could not look up parent scope of second subscope on configuration")
- assert_equal(subscope.object_id, config.parent(another).object_id, "Did not get correct parent scope of second subscope from configuration")
+ assert(config.parent(another), "Could not look up parent scope of second subscope on compile")
+ assert_equal(subscope.object_id, config.parent(another).object_id, "Did not get correct parent scope of second subscope from compile")
assert_equal(subscope.object_id, another.parent.object_id, "Second subscope did not correctly retrieve its parent scope")
# And make sure both scopes show up in the right order in the search path
@@ -492,10 +492,10 @@ class TestConfiguration < Test::Unit::TestCase
resources.add_edge! scope, resource
result = nil
- assert_nothing_raised("Could not extract transportable configuration") do
+ assert_nothing_raised("Could not extract transportable compile") do
result = config.send :extract_to_transportable
end
- assert_equal([:resource], result, "Did not translate simple configuration correctly")
+ assert_equal([:resource], result, "Did not translate simple compile correctly")
end
def test_extract_to_transportable_complex
@@ -543,10 +543,10 @@ class TestConfiguration < Test::Unit::TestCase
resources.add_edge! bottom, botres
result = nil
- assert_nothing_raised("Could not extract transportable configuration") do
+ assert_nothing_raised("Could not extract transportable compile") do
result = config.send :extract_to_transportable
end
- assert_equal([[[:botres], :midres], :topres], result, "Did not translate medium configuration correctly")
+ assert_equal([[[:botres], :midres], :topres], result, "Did not translate medium compile correctly")
end
def test_verify_uniqueness
diff --git a/test/lib/puppettest/parsertesting.rb b/test/lib/puppettest/parsertesting.rb
index 326c25756..34aeca00a 100644
--- a/test/lib/puppettest/parsertesting.rb
+++ b/test/lib/puppettest/parsertesting.rb
@@ -5,7 +5,7 @@ module PuppetTest::ParserTesting
include PuppetTest
AST = Puppet::Parser::AST
- Config = Puppet::Parser::Configuration
+ Compile = Puppet::Parser::Compile
# A fake class that we can use for testing evaluation.
class FakeAST
@@ -45,7 +45,7 @@ module PuppetTest::ParserTesting
require 'puppet/network/handler/node'
parser ||= mkparser
node = mknode
- return Config.new(node, parser)
+ return Compile.new(node, parser)
end
def mknode(name = nil)