diff options
author | Brice Figureau <brice-puppet@daysofwonder.com> | 2009-04-22 19:30:09 +0200 |
---|---|---|
committer | Brice Figureau <brice-puppet@daysofwonder.com> | 2009-04-23 20:52:04 +0200 |
commit | ec478da93a03d0a9c5cd7b782d86deea6d3b4a8b (patch) | |
tree | 0254bffcb38ac7aa60c540497c57f86cb709174d /spec/unit | |
parent | e623f8a32a7363d98843fdb361c717b6198d32de (diff) | |
download | puppet-ec478da93a03d0a9c5cd7b782d86deea6d3b4a8b.tar.gz puppet-ec478da93a03d0a9c5cd7b782d86deea6d3b4a8b.tar.xz puppet-ec478da93a03d0a9c5cd7b782d86deea6d3b4a8b.zip |
Fix configurer to retrieve catalog with client certname
Rationale:
Before this change, the catalog was retrived with this uri:
/catalog/hostname
On the server side, the corresponding node was found by using the
request node, then finding if this node also match hostname
(which it does of course).
But it is not possible to have an ACL matching the hostname part
of the uri, because it:
* it would be compared to the node name (certname), which obviously
is not the same
* it is not possible to create a dynamic allow/deny rule on a non-fqdn
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'spec/unit')
-rwxr-xr-x | spec/unit/configurer.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/configurer.rb b/spec/unit/configurer.rb index 712cbf715..fcc124d8e 100755 --- a/spec/unit/configurer.rb +++ b/spec/unit/configurer.rb @@ -84,10 +84,10 @@ describe Puppet::Configurer, "when retrieving a catalog" do @agent.retrieve_catalog end - it "should use its Facter name to retrieve the catalog" do + it "should use its certname to retrieve the catalog" do Facter.stubs(:value).returns "eh" - Facter.expects(:value).with("hostname").returns "myhost" - Puppet::Resource::Catalog.expects(:find).with { |name, options| name == "myhost" }.returns @catalog + Puppet.expects(:[]).with(:certname).returns "myhost.domain.com" + Puppet::Resource::Catalog.expects(:find).with { |name, options| name == "myhost.domain.com" }.returns @catalog @agent.retrieve_catalog end |