summaryrefslogtreecommitdiffstats
path: root/test/ral/providers
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-01-15 09:13:10 -0800
committerJames Turnbull <james@lovedthanlost.net>2010-01-30 09:29:51 +1100
commit10becce443741511ff216c98f6f460513a615cdb (patch)
tree76fe13d79910b57bcb3341148e81c6d2d35f21f5 /test/ral/providers
parent49a718539c9f896d01a757e4f8b3ddb21edec0da (diff)
downloadpuppet-10becce443741511ff216c98f6f460513a615cdb.tar.gz
puppet-10becce443741511ff216c98f6f460513a615cdb.tar.xz
puppet-10becce443741511ff216c98f6f460513a615cdb.zip
Fix for #3077 (unit tests broken in 0.25.1-->0.25.4)
Most of these were caused by alias --> host_aliases; one was caused by the canonicalization of resource references and one by the removal of puppet_module.
Diffstat (limited to 'test/ral/providers')
-rwxr-xr-xtest/ral/providers/host/parsed.rb12
-rwxr-xr-xtest/ral/providers/sshkey/parsed.rb10
2 files changed, 11 insertions, 11 deletions
diff --git a/test/ral/providers/host/parsed.rb b/test/ral/providers/host/parsed.rb
index 28b553356..ce70f5c9f 100755
--- a/test/ral/providers/host/parsed.rb
+++ b/test/ral/providers/host/parsed.rb
@@ -45,7 +45,7 @@ class TestParsedHostProvider < Test::Unit::TestCase
return {
:name => "fakehost%s" % @hcount,
:ip => "192.168.27.%s" % @hcount,
- :alias => ["alias%s" % @hcount],
+ :host_aliases => ["alias%s" % @hcount],
:ensure => :present
}
end
@@ -67,7 +67,7 @@ class TestParsedHostProvider < Test::Unit::TestCase
# Make sure we convert both directlys correctly using a simple host.
def test_basic_isomorphism
- hash = {:record_type => :parsed, :name => "myhost", :ip => "192.168.43.56", :alias => %w{another host}}
+ hash = {:record_type => :parsed, :name => "myhost", :ip => "192.168.43.56", :host_aliases => %w{another host}}
str = nil
assert_nothing_raised do
@@ -103,7 +103,7 @@ class TestParsedHostProvider < Test::Unit::TestCase
assert_equal([
{:record_type => :comment, :line => "# comment one"},
{:record_type => :blank, :line => ""},
- {:record_type => :parsed, :name => "myhost", :ip => "192.168.43.56", :alias => %w{another host}},
+ {:record_type => :parsed, :name => "myhost", :ip => "192.168.43.56", :host_aliases => %w{another host}},
{:record_type => :blank, :line => " "},
{:record_type => :comment, :line => "# another comment"},
{:record_type => :parsed, :name => "anotherhost", :ip => "192.168.43.57"}
@@ -150,13 +150,13 @@ class TestParsedHostProvider < Test::Unit::TestCase
}
# Remove a single field and make sure it gets tossed
- name = host.alias
- host.alias = [:absent]
+ name = host.host_aliases
+ host.host_aliases = [:absent]
assert_nothing_raised {
host.flush
assert(! file.read.include?(name[0]),
- "Did not remove alias from disk")
+ "Did not remove host_aliases from disk")
}
# Make sure it throws up if we remove a required field
diff --git a/test/ral/providers/sshkey/parsed.rb b/test/ral/providers/sshkey/parsed.rb
index 868640a10..cad758568 100755
--- a/test/ral/providers/sshkey/parsed.rb
+++ b/test/ral/providers/sshkey/parsed.rb
@@ -32,7 +32,7 @@ class TestParsedSSHKey < Test::Unit::TestCase
args = {
:name => name || "/fspuppet%s" % @pcount,
:key => "thisismykey%s" % @pcount,
- :alias => ["host1.domain.com","192.168.0.1"],
+ :host_aliases => ["host1.domain.com","192.168.0.1"],
:type => "dss",
:ensure => :present
}
@@ -68,11 +68,11 @@ class TestParsedSSHKey < Test::Unit::TestCase
key.flush
end
- assert(key.alias, "No alias set for key")
+ assert(key.host_aliases, "No host_aliases set for key")
hash = key.property_hash.dup
text = @provider.target_object(file).read
- names = [key.name, key.alias].flatten.join(",")
+ names = [key.name, key.host_aliases].flatten.join(",")
assert_equal("#{names} #{key.type} #{key.key}\n", text)
@@ -94,12 +94,12 @@ class TestParsedSSHKey < Test::Unit::TestCase
result = @provider.parse_line("one,two type key")
end
assert_equal("one", result[:name], "Did not call post hook")
- assert_equal(%w{two}, result[:alias], "Did not call post hook")
+ assert_equal(%w{two}, result[:host_aliases], "Did not call post hook")
assert_equal("one,two type key",
@provider.to_line(:record_type => :parsed,
:name => "one",
- :alias => %w{two},
+ :host_aliases => %w{two},
:type => "type",
:key => "key"),
"Did not use pre-hook when generating line"