puppet 3.0.0.rc5 → 3.0.0.rc7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- data/LICENSE +1 -1
- data/README_DEVELOPER.md +209 -1
- data/README_HIERA.md +148 -0
- data/Rakefile +25 -27
- data/bin/extlookup2hiera +56 -0
- data/conf/auth.conf +34 -34
- data/examples/hiera/README.md +91 -0
- data/examples/hiera/etc/hiera.yaml +15 -0
- data/examples/hiera/etc/hieradb/common.yaml +3 -0
- data/examples/hiera/etc/hieradb/dc1.yaml +6 -0
- data/examples/hiera/etc/hieradb/development.yaml +2 -0
- data/examples/hiera/etc/puppet.conf +3 -0
- data/examples/hiera/modules/data/manifests/common.pp +3 -0
- data/examples/hiera/modules/ntp/manifests/config.pp +5 -0
- data/examples/hiera/modules/ntp/manifests/data.pp +3 -0
- data/examples/hiera/modules/ntp/templates/ntp.conf.erb +3 -0
- data/examples/hiera/modules/users/manifests/common.pp +3 -0
- data/examples/hiera/modules/users/manifests/dc1.pp +3 -0
- data/examples/hiera/modules/users/manifests/development.pp +3 -0
- data/examples/hiera/site.pp +3 -0
- data/ext/build_defaults.yaml +23 -0
- data/ext/debian/README.Debian +8 -0
- data/ext/debian/README.source +2 -0
- data/ext/debian/TODO.Debian +1 -0
- data/ext/debian/changelog.erb +1104 -0
- data/ext/debian/compat +1 -0
- data/ext/debian/control +143 -0
- data/ext/debian/copyright +361 -0
- data/ext/debian/docs +1 -0
- data/ext/debian/fileserver.conf +17 -0
- data/ext/debian/puppet-common.dirs +8 -0
- data/ext/debian/puppet-common.install +4 -0
- data/ext/debian/puppet-common.lintian-overrides +5 -0
- data/ext/debian/puppet-common.manpages +2 -0
- data/ext/debian/puppet-common.postinst +35 -0
- data/ext/debian/puppet-common.postrm +32 -0
- data/ext/debian/puppet-el.dirs +1 -0
- data/ext/debian/puppet-el.emacsen-install +25 -0
- data/ext/debian/puppet-el.emacsen-remove +11 -0
- data/ext/debian/puppet-el.emacsen-startup +9 -0
- data/ext/debian/puppet-el.install +1 -0
- data/ext/debian/puppet-testsuite.install +2 -0
- data/ext/debian/puppet-testsuite.lintian-overrides +4 -0
- data/ext/debian/puppet.conf +14 -0
- data/ext/debian/puppet.default +7 -0
- data/ext/debian/puppet.init +118 -0
- data/ext/debian/puppet.lintian-overrides +3 -0
- data/ext/debian/puppet.logrotate +11 -0
- data/ext/debian/puppet.manpages +32 -0
- data/ext/debian/puppet.postinst +20 -0
- data/ext/debian/puppet.postrm +20 -0
- data/ext/debian/puppet.preinst +20 -0
- data/ext/debian/puppetmaster-common.install +2 -0
- data/ext/debian/puppetmaster-common.manpages +2 -0
- data/ext/debian/puppetmaster-common.puppetqd.default +27 -0
- data/ext/debian/puppetmaster-common.puppetqd.init +84 -0
- data/ext/debian/puppetmaster-passenger.dirs +4 -0
- data/ext/debian/puppetmaster-passenger.postinst +66 -0
- data/ext/debian/puppetmaster-passenger.postrm +33 -0
- data/ext/debian/puppetmaster.README.debian +16 -0
- data/ext/debian/puppetmaster.default +38 -0
- data/ext/debian/puppetmaster.init +158 -0
- data/ext/debian/puppetmaster.lintian-overrides +3 -0
- data/ext/debian/puppetmaster.postinst +20 -0
- data/ext/debian/puppetmaster.postrm +5 -0
- data/ext/debian/puppetmaster.preinst +22 -0
- data/ext/debian/rules +128 -0
- data/ext/debian/source/format +1 -0
- data/ext/debian/source/options +1 -0
- data/ext/debian/vim-puppet.README.Debian +13 -0
- data/ext/debian/vim-puppet.dirs +3 -0
- data/ext/debian/vim-puppet.yaml +5 -0
- data/ext/debian/watch +2 -0
- data/ext/emacs/puppet-mode.el +1 -0
- data/ext/envpuppet +4 -0
- data/ext/envpuppet.bat +3 -2
- data/{conf → ext}/freebsd/puppetd +0 -0
- data/{conf → ext}/freebsd/puppetmasterd +0 -0
- data/{conf → ext}/gentoo/conf.d/puppet +0 -0
- data/{conf → ext}/gentoo/conf.d/puppetmaster +0 -0
- data/{conf → ext}/gentoo/init.d/puppet +0 -0
- data/{conf → ext}/gentoo/init.d/puppetmaster +0 -0
- data/{conf → ext}/gentoo/puppet/fileserver.conf +0 -0
- data/{conf → ext}/gentoo/puppet/puppet.conf +0 -0
- data/ext/ips/puppet-agent +49 -0
- data/ext/ips/puppet-master +44 -0
- data/ext/ips/puppet.conf +29 -0
- data/ext/ips/puppet.p5m.erb +12 -0
- data/ext/ips/puppetagent.xml +46 -0
- data/ext/ips/puppetmaster.xml +42 -0
- data/ext/ips/rules +19 -0
- data/ext/ips/transforms +34 -0
- data/{conf → ext}/osx/PackageInfo.plist +0 -0
- data/{conf → ext}/osx/createpackage.sh +1 -1
- data/ext/osx/file_mapping.yaml +33 -0
- data/ext/osx/preflight.erb +37 -0
- data/{tasks/rake/templates → ext/osx}/prototype.plist.erb +0 -0
- data/ext/packaging/README-Solaris.md +117 -0
- data/ext/packaging/README.md +89 -0
- data/ext/packaging/tasks/00_utils.rb +236 -0
- data/ext/packaging/tasks/10_setupvars.rake +62 -0
- data/ext/packaging/tasks/apple.rake +201 -0
- data/ext/packaging/tasks/clean.rake +5 -0
- data/ext/packaging/tasks/deb.rake +105 -0
- data/ext/packaging/tasks/gem.rake +52 -0
- data/ext/packaging/tasks/ips.rake +78 -0
- data/ext/packaging/tasks/mock.rake +88 -0
- data/ext/packaging/tasks/release.rake +20 -0
- data/ext/packaging/tasks/rpm.rake +39 -0
- data/ext/packaging/tasks/ship.rake +34 -0
- data/ext/packaging/tasks/sign.rake +76 -0
- data/ext/packaging/tasks/tar.rake +20 -0
- data/ext/project_data.yaml +25 -0
- data/ext/rack/files/apache2.conf +2 -1
- data/{conf → ext}/redhat/client.init +0 -0
- data/{conf → ext}/redhat/client.sysconfig +0 -0
- data/{conf → ext}/redhat/fileserver.conf +0 -0
- data/{conf → ext}/redhat/logrotate +0 -0
- data/{conf → ext}/redhat/puppet.conf +0 -0
- data/{conf/redhat/puppet.spec → ext/redhat/puppet.spec.erb} +140 -33
- data/{conf → ext}/redhat/queue.init +0 -0
- data/{conf → ext}/redhat/rundir-perms.patch +0 -0
- data/{conf → ext}/redhat/server.init +0 -0
- data/{conf → ext}/redhat/server.sysconfig +0 -0
- data/{conf → ext}/solaris/pkginfo +0 -0
- data/{conf → ext}/solaris/smf/puppetd.xml +0 -0
- data/{conf → ext}/solaris/smf/puppetmasterd.xml +0 -0
- data/{conf → ext}/solaris/smf/svc-puppetd +0 -0
- data/{conf → ext}/solaris/smf/svc-puppetmasterd +0 -0
- data/{conf → ext}/suse/client.init +0 -0
- data/{conf → ext}/suse/fileserver.conf +0 -0
- data/{conf → ext}/suse/logrotate +0 -0
- data/{conf → ext}/suse/puppet.conf +0 -0
- data/{conf → ext}/suse/puppet.spec +1 -1
- data/{conf → ext}/suse/server.init +0 -0
- data/ext/systemd/puppetagent.service +13 -0
- data/ext/systemd/puppetmaster.service +13 -0
- data/{conf → ext}/windows/eventlog/Rakefile +0 -0
- data/{conf → ext}/windows/eventlog/puppetres.dll +0 -0
- data/{conf → ext}/windows/eventlog/puppetres.mc +0 -0
- data/ext/windows/service/daemon.bat +6 -0
- data/ext/windows/service/daemon.rb +90 -0
- data/install.rb +22 -32
- data/lib/hiera/backend/puppet_backend.rb +102 -0
- data/lib/hiera/scope.rb +42 -0
- data/lib/hiera_puppet.rb +89 -0
- data/lib/puppet.rb +1 -1
- data/lib/puppet/agent.rb +2 -2
- data/lib/puppet/agent/locker.rb +12 -9
- data/lib/puppet/application.rb +10 -8
- data/lib/puppet/application/agent.rb +12 -8
- data/lib/puppet/application/apply.rb +2 -2
- data/lib/puppet/application/cert.rb +6 -6
- data/lib/puppet/application/certificate.rb +1 -4
- data/lib/puppet/application/describe.rb +1 -1
- data/lib/puppet/application/device.rb +5 -2
- data/lib/puppet/application/doc.rb +1 -1
- data/lib/puppet/application/face_base.rb +3 -13
- data/lib/puppet/application/filebucket.rb +1 -1
- data/lib/puppet/application/inspect.rb +1 -1
- data/lib/puppet/application/kick.rb +4 -2
- data/lib/puppet/application/master.rb +2 -2
- data/lib/puppet/application/queue.rb +3 -1
- data/lib/puppet/application/resource.rb +1 -1
- data/lib/puppet/configurer.rb +11 -7
- data/lib/puppet/configurer/downloader.rb +1 -4
- data/lib/puppet/daemon.rb +4 -4
- data/lib/puppet/defaults.rb +64 -60
- data/lib/puppet/external/dot.rb +1 -1
- data/lib/puppet/external/pson/common.rb +15 -0
- data/lib/puppet/external/pson/pure.rb +0 -62
- data/lib/puppet/external/pson/pure/generator.rb +1 -1
- data/lib/puppet/external/pson/pure/parser.rb +2 -2
- data/lib/puppet/face/ca.rb +19 -14
- data/lib/puppet/face/config.rb +2 -2
- data/lib/puppet/face/facts.rb +1 -1
- data/lib/puppet/face/help/action.erb +0 -1
- data/lib/puppet/face/help/face.erb +0 -1
- data/lib/puppet/face/help/man.erb +3 -6
- data/lib/puppet/face/module/install.rb +1 -1
- data/lib/puppet/face/module/list.rb +1 -1
- data/lib/puppet/face/module/uninstall.rb +1 -1
- data/lib/puppet/face/node.rb +1 -1
- data/lib/puppet/face/node/clean.rb +30 -25
- data/lib/puppet/feature/base.rb +0 -3
- data/lib/puppet/feature/rails.rb +2 -1
- data/lib/puppet/file_serving/terminus_selector.rb +1 -1
- data/lib/puppet/indirector/catalog/active_record.rb +5 -0
- data/lib/puppet/indirector/catalog/static_compiler.rb +2 -3
- data/lib/puppet/indirector/certificate/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/certificate_request/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/certificate_revocation_list/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/face.rb +3 -3
- data/lib/puppet/indirector/facts/active_record.rb +5 -0
- data/lib/puppet/indirector/facts/facter.rb +1 -4
- data/lib/puppet/indirector/facts/inventory_active_record.rb +6 -0
- data/lib/puppet/indirector/file_bucket_file/file.rb +2 -1
- data/lib/puppet/indirector/indirection.rb +2 -2
- data/lib/puppet/indirector/key/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/node/active_record.rb +5 -0
- data/lib/puppet/indirector/request.rb +4 -0
- data/lib/puppet/indirector/resource/active_record.rb +5 -0
- data/lib/puppet/network/authentication.rb +30 -0
- data/lib/puppet/network/http.rb +0 -13
- data/lib/puppet/network/http/connection.rb +10 -2
- data/lib/puppet/network/http/handler.rb +8 -0
- data/lib/puppet/network/http/mongrel/rest.rb +5 -0
- data/lib/puppet/network/http/rack/rest.rb +7 -0
- data/lib/puppet/network/http/webrick.rb +3 -6
- data/lib/puppet/network/http/webrick/rest.rb +4 -0
- data/lib/puppet/network/server.rb +9 -33
- data/lib/puppet/node.rb +1 -1
- data/lib/puppet/node/facts.rb +0 -1
- data/lib/puppet/parser/compiler.rb +1 -1
- data/lib/puppet/parser/functions.rb +12 -1
- data/lib/puppet/parser/functions/hiera.rb +8 -0
- data/lib/puppet/parser/functions/hiera_array.rb +8 -0
- data/lib/puppet/parser/functions/hiera_hash.rb +8 -0
- data/lib/puppet/parser/functions/hiera_include.rb +11 -0
- data/lib/puppet/parser/functions/shellquote.rb +21 -29
- data/lib/puppet/parser/lexer.rb +2 -1
- data/lib/puppet/parser/scope.rb +8 -0
- data/lib/puppet/provider/exec/windows.rb +1 -1
- data/lib/puppet/provider/group/groupadd.rb +2 -3
- data/lib/puppet/provider/package/pkg.rb +37 -10
- data/lib/puppet/provider/service/daemontools.rb +1 -1
- data/lib/puppet/provider/service/launchd.rb +1 -1
- data/lib/puppet/provider/service/redhat.rb +1 -1
- data/lib/puppet/provider/service/runit.rb +1 -1
- data/lib/puppet/provider/user/useradd.rb +8 -3
- data/lib/puppet/provider/user/windows_adsi.rb +11 -0
- data/lib/puppet/provider/zfs/zfs.rb +29 -2
- data/lib/puppet/provider/zone/solaris.rb +144 -39
- data/lib/puppet/provider/zpool/zpool.rb +7 -10
- data/lib/puppet/settings.rb +50 -86
- data/lib/puppet/settings/duration_setting.rb +34 -0
- data/lib/puppet/settings/terminus_setting.rb +16 -0
- data/lib/puppet/ssl/base.rb +49 -9
- data/lib/puppet/ssl/certificate.rb +13 -9
- data/lib/puppet/ssl/certificate_authority.rb +4 -0
- data/lib/puppet/ssl/certificate_authority/interface.rb +10 -17
- data/lib/puppet/ssl/certificate_factory.rb +4 -21
- data/lib/puppet/ssl/certificate_request.rb +1 -10
- data/lib/puppet/ssl/certificate_revocation_list.rb +1 -3
- data/lib/puppet/ssl/digest.rb +20 -0
- data/lib/puppet/ssl/host.rb +31 -6
- data/lib/puppet/test/test_helper.rb +1 -1
- data/lib/puppet/transaction/report.rb +2 -1
- data/lib/puppet/type.rb +1 -1
- data/lib/puppet/type/augeas.rb +1 -1
- data/lib/puppet/type/cron.rb +1 -1
- data/lib/puppet/type/exec.rb +7 -8
- data/lib/puppet/type/file.rb +1 -1
- data/lib/puppet/type/file/content.rb +2 -2
- data/lib/puppet/type/file/ensure.rb +1 -1
- data/lib/puppet/type/file/mode.rb +1 -1
- data/lib/puppet/type/file/selcontext.rb +6 -2
- data/lib/puppet/type/file/source.rb +1 -1
- data/lib/puppet/type/schedule.rb +1 -1
- data/lib/puppet/type/scheduled_task.rb +1 -1
- data/lib/puppet/type/tidy.rb +1 -1
- data/lib/puppet/type/zone.rb +126 -253
- data/lib/puppet/util.rb +10 -23
- data/lib/puppet/util/adsi.rb +22 -14
- data/lib/puppet/util/log/destinations.rb +7 -0
- data/lib/puppet/util/log/rate_limited_logger.rb +40 -0
- data/lib/puppet/util/metric.rb +2 -2
- data/lib/puppet/util/monkey_patches.rb +8 -0
- data/lib/puppet/util/platform.rb +7 -0
- data/lib/puppet/util/selinux.rb +31 -36
- data/lib/puppet/util/windows/error.rb +1 -1
- data/lib/puppet/util/windows/process.rb +3 -3
- data/lib/puppet/util/windows/security.rb +7 -7
- data/lib/puppet/util/windows/user.rb +65 -2
- data/lib/puppet/util/zaml.rb +90 -46
- data/lib/puppet/version.rb +1 -1
- data/spec/fixtures/hiera.yaml +9 -0
- data/spec/fixtures/manifests/site.pp +0 -0
- data/spec/integration/defaults_spec.rb +25 -11
- data/spec/integration/faces/ca_spec.rb +11 -16
- data/spec/integration/network/server/webrick_spec.rb +14 -27
- data/spec/integration/node_spec.rb +4 -1
- data/spec/integration/parser/functions/require_spec.rb +3 -3
- data/spec/integration/parser/undef_param_spec.rb +88 -0
- data/spec/integration/provider/mount_spec.rb +4 -1
- data/spec/integration/ssl/certificate_authority_spec.rb +18 -0
- data/spec/lib/puppet_spec/files.rb +3 -3
- data/spec/lib/puppet_spec/settings.rb +0 -1
- data/spec/shared_contexts/platform.rb +8 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/unit/agent/locker_spec.rb +8 -2
- data/spec/unit/application/agent_spec.rb +29 -7
- data/spec/unit/application/apply_spec.rb +1 -1
- data/spec/unit/application/device_spec.rb +18 -1
- data/spec/unit/application/face_base_spec.rb +16 -2
- data/spec/unit/application/kick_spec.rb +8 -0
- data/spec/unit/application/queue_spec.rb +5 -0
- data/spec/unit/application_spec.rb +13 -23
- data/spec/unit/configurer/downloader_spec.rb +2 -11
- data/spec/unit/configurer_spec.rb +6 -0
- data/spec/unit/face/node_spec.rb +1 -1
- data/spec/unit/hiera/backend/puppet_backend_spec.rb +140 -0
- data/spec/unit/hiera/scope_spec.rb +62 -0
- data/spec/unit/hiera_puppet_spec.rb +111 -0
- data/spec/unit/indirector/catalog/active_record_spec.rb +4 -0
- data/spec/unit/indirector/catalog/static_compiler_spec.rb +194 -0
- data/spec/unit/indirector/certificate/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/certificate_request/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/certificate_revocation_list/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/facts/active_record_spec.rb +37 -26
- data/spec/unit/indirector/facts/inventory_active_record_spec.rb +5 -0
- data/spec/unit/indirector/hiera_spec.rb +2 -1
- data/spec/unit/indirector/key/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/node/active_record_spec.rb +7 -0
- data/spec/unit/indirector/request_spec.rb +22 -0
- data/spec/unit/indirector/resource/active_record_spec.rb +5 -0
- data/spec/unit/module_tool/application_spec.rb +1 -1
- data/spec/unit/network/authentication_spec.rb +86 -0
- data/spec/unit/network/http/connection_spec.rb +21 -0
- data/spec/unit/network/http/handler_spec.rb +12 -0
- data/spec/unit/network/http/rack/rest_spec.rb +7 -0
- data/spec/unit/network/http/webrick_spec.rb +11 -26
- data/spec/unit/network/server_spec.rb +79 -192
- data/spec/unit/node/facts_spec.rb +2 -2
- data/spec/unit/parser/ast/vardef_spec.rb +4 -4
- data/spec/unit/parser/files_spec.rb +3 -0
- data/spec/unit/parser/functions/defined_spec.rb +5 -5
- data/spec/unit/parser/functions/fqdn_rand_spec.rb +1 -1
- data/spec/unit/parser/functions/hiera_array_spec.rb +23 -0
- data/spec/unit/parser/functions/hiera_hash_spec.rb +19 -0
- data/spec/unit/parser/functions/hiera_include_spec.rb +19 -0
- data/spec/unit/parser/functions/hiera_spec.rb +21 -0
- data/spec/unit/parser/functions/include_spec.rb +3 -3
- data/spec/unit/parser/functions/realize_spec.rb +3 -3
- data/spec/unit/parser/functions/require_spec.rb +5 -5
- data/spec/unit/parser/functions/shellquote_spec.rb +0 -4
- data/spec/unit/parser/functions_spec.rb +6 -10
- data/spec/unit/parser/lexer_spec.rb +13 -0
- data/spec/unit/parser/scope_spec.rb +16 -1
- data/spec/unit/provider/exec/posix_spec.rb +7 -6
- data/spec/unit/provider/group/groupadd_spec.rb +36 -30
- data/spec/unit/provider/package/pkg_spec.rb +16 -2
- data/spec/unit/provider/service/redhat_spec.rb +2 -2
- data/spec/unit/provider/sshkey/parsed_spec.rb +4 -0
- data/spec/unit/provider/user/user_role_add_spec.rb +125 -126
- data/spec/unit/provider/user/useradd_spec.rb +147 -118
- data/spec/unit/provider/user/windows_adsi_spec.rb +22 -0
- data/spec/unit/provider/zone/solaris_spec.rb +126 -7
- data/spec/unit/provider/zpool/zpool_spec.rb +4 -3
- data/spec/unit/puppet_spec.rb +7 -0
- data/spec/unit/settings/duration_setting_spec.rb +45 -0
- data/spec/unit/settings/terminus_setting_spec.rb +28 -0
- data/spec/unit/settings_spec.rb +21 -23
- data/spec/unit/ssl/base_spec.rb +68 -19
- data/spec/unit/ssl/certificate_authority/interface_spec.rb +19 -30
- data/spec/unit/ssl/certificate_authority_spec.rb +3 -2
- data/spec/unit/ssl/certificate_factory_spec.rb +15 -6
- data/spec/unit/ssl/certificate_request_spec.rb +80 -113
- data/spec/unit/ssl/certificate_revocation_list_spec.rb +1 -1
- data/spec/unit/ssl/certificate_spec.rb +26 -2
- data/spec/unit/ssl/digest_spec.rb +35 -0
- data/spec/unit/ssl/host_spec.rb +73 -27
- data/spec/unit/ssl/key_spec.rb +0 -4
- data/spec/unit/type/exec_spec.rb +1 -1
- data/spec/unit/type/file_spec.rb +2 -1
- data/spec/unit/type/scheduled_task_spec.rb +2 -2
- data/spec/unit/type/zone_spec.rb +52 -10
- data/spec/unit/util/adsi_spec.rb +19 -0
- data/spec/unit/util/checksums_spec.rb +2 -3
- data/spec/unit/util/execution_spec.rb +1 -1
- data/spec/unit/util/log/destinations_spec.rb +1 -0
- data/spec/unit/util/log/rate_limited_logger_spec.rb +51 -0
- data/spec/unit/util/logging_spec.rb +6 -6
- data/spec/unit/util/selinux_spec.rb +24 -32
- data/spec/unit/util/zaml_spec.rb +94 -6
- data/spec/unit/util_spec.rb +17 -0
- data/spec/watchr.rb +2 -6
- data/tasks/{rake/manpages.rake → manpages.rake} +0 -0
- data/tasks/{rake/parser.rake → parser.rake} +0 -0
- metadata +1003 -119
- data/CHANGELOG +0 -9233
- data/conf/osx/preflight +0 -24
- data/lib/puppet/network/http/mongrel.rb +0 -35
- data/lib/puppet/util/config_timeout.rb +0 -24
- data/spec/unit/network/http/mongrel/rest_spec.rb +0 -257
- data/spec/unit/network/http/mongrel_spec.rb +0 -91
- data/spec/unit/network/http_spec.rb +0 -31
- data/spec/unit/util/config_timeout_spec.rb +0 -57
- data/tasks/rake/apple.rake +0 -176
- data/tasks/rake/changelog.rake +0 -15
- data/tasks/rake/ci.rake +0 -22
- data/tasks/rake/dailybuild.rake +0 -9
- data/tasks/rake/gem.rake +0 -63
- data/tasks/rake/git_workflow.rake +0 -134
- data/tasks/rake/metrics.rake +0 -14
- data/tasks/rake/sign.rake +0 -14
- data/tasks/rake/testbranch.rake +0 -16
- data/tasks/rake/yard.rake +0 -11
@@ -5,143 +5,110 @@ require 'puppet/ssl/certificate_request'
|
|
5
5
|
require 'puppet/ssl/key'
|
6
6
|
|
7
7
|
describe Puppet::SSL::CertificateRequest do
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
let(:request) { described_class.new("myname") }
|
9
|
+
let(:key) {
|
10
|
+
k = Puppet::SSL::Key.new("myname")
|
11
|
+
k.generate
|
12
|
+
k
|
13
|
+
}
|
14
|
+
|
11
15
|
|
12
16
|
it "should be extended with the Indirector module" do
|
13
|
-
|
17
|
+
described_class.singleton_class.should be_include(Puppet::Indirector)
|
14
18
|
end
|
15
19
|
|
16
20
|
it "should indirect certificate_request" do
|
17
|
-
|
21
|
+
described_class.indirection.name.should == :certificate_request
|
18
22
|
end
|
19
23
|
|
20
24
|
it "should use any provided name as its name" do
|
21
|
-
|
25
|
+
described_class.new("myname").name.should == "myname"
|
22
26
|
end
|
23
27
|
|
24
28
|
it "should only support the text format" do
|
25
|
-
|
29
|
+
described_class.supported_formats.should == [:s]
|
26
30
|
end
|
27
31
|
|
28
32
|
describe "when converting from a string" do
|
29
33
|
it "should create a CSR instance with its name set to the CSR subject and its content set to the extracted CSR" do
|
30
|
-
csr = stub 'csr', :subject => "/CN=Foo.madstop.com"
|
34
|
+
csr = stub 'csr', :subject => "/CN=Foo.madstop.com", :is_a? => true
|
31
35
|
OpenSSL::X509::Request.expects(:new).with("my csr").returns(csr)
|
32
36
|
|
33
37
|
mycsr = stub 'sslcsr'
|
34
38
|
mycsr.expects(:content=).with(csr)
|
35
39
|
|
36
|
-
|
40
|
+
described_class.expects(:new).with("Foo.madstop.com").returns mycsr
|
37
41
|
|
38
|
-
|
42
|
+
described_class.from_s("my csr")
|
39
43
|
end
|
40
44
|
end
|
41
45
|
|
42
46
|
describe "when managing instances" do
|
43
|
-
before do
|
44
|
-
@request = @class.new("myname")
|
45
|
-
end
|
46
|
-
|
47
47
|
it "should have a name attribute" do
|
48
|
-
|
48
|
+
request.name.should == "myname"
|
49
49
|
end
|
50
50
|
|
51
51
|
it "should downcase its name" do
|
52
|
-
|
52
|
+
described_class.new("MyName").name.should == "myname"
|
53
53
|
end
|
54
54
|
|
55
55
|
it "should have a content attribute" do
|
56
|
-
|
56
|
+
request.should respond_to(:content)
|
57
57
|
end
|
58
58
|
|
59
59
|
it "should be able to read requests from disk" do
|
60
60
|
path = "/my/path"
|
61
61
|
File.expects(:read).with(path).returns("my request")
|
62
|
-
|
63
|
-
OpenSSL::X509::Request.expects(:new).with("my request").returns(
|
64
|
-
|
65
|
-
|
62
|
+
my_req = mock 'request'
|
63
|
+
OpenSSL::X509::Request.expects(:new).with("my request").returns(my_req)
|
64
|
+
request.read(path).should equal(my_req)
|
65
|
+
request.content.should equal(my_req)
|
66
66
|
end
|
67
67
|
|
68
68
|
it "should return an empty string when converted to a string with no request" do
|
69
|
-
|
69
|
+
request.to_s.should == ""
|
70
70
|
end
|
71
71
|
|
72
72
|
it "should convert the request to pem format when converted to a string" do
|
73
|
-
request
|
74
|
-
|
75
|
-
@request.to_s.should == "pem"
|
73
|
+
request.generate(key)
|
74
|
+
request.to_s.should == request.content.to_pem
|
76
75
|
end
|
77
76
|
|
78
77
|
it "should have a :to_text method that it delegates to the actual key" do
|
79
78
|
real_request = mock 'request'
|
80
79
|
real_request.expects(:to_text).returns "requesttext"
|
81
|
-
|
82
|
-
|
80
|
+
request.content = real_request
|
81
|
+
request.to_text.should == "requesttext"
|
83
82
|
end
|
84
83
|
end
|
85
84
|
|
86
85
|
describe "when generating" do
|
87
|
-
before do
|
88
|
-
@instance = @class.new("myname")
|
89
|
-
|
90
|
-
key = Puppet::SSL::Key.new("myname")
|
91
|
-
@key = key.generate
|
92
|
-
|
93
|
-
@request = OpenSSL::X509::Request.new
|
94
|
-
OpenSSL::X509::Request.expects(:new).returns(@request)
|
95
|
-
|
96
|
-
@request.stubs(:verify).returns(true)
|
97
|
-
end
|
98
|
-
|
99
86
|
it "should use the content of the provided key if the key is a Puppet::SSL::Key instance" do
|
100
|
-
|
101
|
-
key.
|
102
|
-
|
103
|
-
@request.expects(:sign).with{ |key, digest| key == @key }
|
104
|
-
@instance.generate(key)
|
105
|
-
end
|
106
|
-
|
107
|
-
it "should log that it is creating a new certificate request" do
|
108
|
-
Puppet.expects(:info).twice
|
109
|
-
@instance.generate(@key)
|
87
|
+
request.generate(key)
|
88
|
+
request.content.verify(key.content.public_key).should be_true
|
110
89
|
end
|
111
90
|
|
112
91
|
it "should set the subject to [CN, name]" do
|
113
|
-
|
114
|
-
OpenSSL::X509::Name
|
115
|
-
|
116
|
-
@instance.generate(@key)
|
117
|
-
end
|
118
|
-
|
119
|
-
it "should set the CN to the CSR name when the CSR is not for a CA" do
|
120
|
-
subject = mock 'subject'
|
121
|
-
OpenSSL::X509::Name.expects(:new).with { |subject| subject[0][1] == @instance.name }.returns(subject)
|
122
|
-
@request.expects(:subject=).with(subject)
|
123
|
-
@instance.generate(@key)
|
92
|
+
request.generate(key)
|
93
|
+
# OpenSSL::X509::Name only implements equality as `eql?`
|
94
|
+
request.content.subject.should eql OpenSSL::X509::Name.new([['CN', key.name]])
|
124
95
|
end
|
125
96
|
|
126
97
|
it "should set the CN to the :ca_name setting when the CSR is for a CA" do
|
127
|
-
subject = mock 'subject'
|
128
98
|
Puppet[:ca_name] = "mycertname"
|
129
|
-
|
130
|
-
|
131
|
-
Puppet::SSL::CertificateRequest.new(Puppet::SSL::CA_NAME).generate(@key)
|
99
|
+
request = described_class.new(Puppet::SSL::CA_NAME).generate(key)
|
100
|
+
request.subject.should eql OpenSSL::X509::Name.new([['CN', Puppet[:ca_name]]])
|
132
101
|
end
|
133
102
|
|
134
103
|
it "should set the version to 0" do
|
135
|
-
|
136
|
-
|
104
|
+
request.generate(key)
|
105
|
+
request.content.version.should == 0
|
137
106
|
end
|
138
107
|
|
139
108
|
it "should set the public key to the provided key's public key" do
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
@request.expects(:public_key=).with(@key.public_key)
|
144
|
-
@instance.generate(@key)
|
109
|
+
request.generate(key)
|
110
|
+
# The openssl bindings do not define equality on keys so we use to_s
|
111
|
+
request.content.public_key.to_s.should == key.content.public_key.to_s
|
145
112
|
end
|
146
113
|
|
147
114
|
context "without subjectAltName / dns_alt_names" do
|
@@ -151,14 +118,15 @@ describe Puppet::SSL::CertificateRequest do
|
|
151
118
|
|
152
119
|
["extreq", "msExtReq"].each do |name|
|
153
120
|
it "should not add any #{name} attribute" do
|
154
|
-
|
155
|
-
|
156
|
-
|
121
|
+
request.generate(key)
|
122
|
+
request.content.attributes.find do |attr|
|
123
|
+
attr.oid == name
|
124
|
+
end.should_not be
|
157
125
|
end
|
158
126
|
|
159
127
|
it "should return no subjectAltNames" do
|
160
|
-
|
161
|
-
|
128
|
+
request.generate(key)
|
129
|
+
request.subject_alt_names.should be_empty
|
162
130
|
end
|
163
131
|
end
|
164
132
|
end
|
@@ -170,14 +138,15 @@ describe Puppet::SSL::CertificateRequest do
|
|
170
138
|
|
171
139
|
["extreq", "msExtReq"].each do |name|
|
172
140
|
it "should not add any #{name} attribute" do
|
173
|
-
|
174
|
-
|
175
|
-
|
141
|
+
request.generate(key)
|
142
|
+
request.content.attributes.find do |attr|
|
143
|
+
attr.oid == name
|
144
|
+
end.should_not be
|
176
145
|
end
|
177
146
|
|
178
147
|
it "should return no subjectAltNames" do
|
179
|
-
|
180
|
-
|
148
|
+
request.generate(key)
|
149
|
+
request.subject_alt_names.should be_empty
|
181
150
|
end
|
182
151
|
end
|
183
152
|
end
|
@@ -188,61 +157,59 @@ describe Puppet::SSL::CertificateRequest do
|
|
188
157
|
end
|
189
158
|
|
190
159
|
it "should add an extreq attribute" do
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
y.value[0].value == "subjectAltName"
|
195
|
-
end
|
196
|
-
end
|
160
|
+
request.generate(key, :dns_alt_names => 'one, two')
|
161
|
+
extReq = request.content.attributes.find do |attr|
|
162
|
+
attr.oid == 'extReq'
|
197
163
|
end
|
198
164
|
|
199
|
-
|
165
|
+
extReq.should be
|
166
|
+
extReq.value.value.all? do |x|
|
167
|
+
x.value.all? do |y|
|
168
|
+
y.value[0].value.should == "subjectAltName"
|
169
|
+
end
|
170
|
+
end
|
200
171
|
end
|
201
172
|
|
202
173
|
it "should return the subjectAltName values" do
|
203
|
-
|
204
|
-
|
174
|
+
request.generate(key, :dns_alt_names => 'one,two')
|
175
|
+
request.subject_alt_names.should =~ ["DNS:myname", "DNS:one", "DNS:two"]
|
205
176
|
end
|
206
177
|
end
|
207
178
|
|
208
|
-
it "should sign the csr with the provided key
|
209
|
-
|
210
|
-
|
211
|
-
@request.expects(:sign).with(@key, digest)
|
212
|
-
@instance.generate(@key)
|
179
|
+
it "should sign the csr with the provided key" do
|
180
|
+
request.generate(key)
|
181
|
+
request.content.verify(key.content.public_key).should be_true
|
213
182
|
end
|
214
183
|
|
215
184
|
it "should verify the generated request using the public key" do
|
216
185
|
# Stupid keys don't have a competent == method.
|
217
|
-
|
218
|
-
|
186
|
+
OpenSSL::X509::Request.any_instance.expects(:verify).with { |public_key|
|
187
|
+
public_key.to_s == key.content.public_key.to_s
|
188
|
+
}.returns true
|
189
|
+
request.generate(key)
|
219
190
|
end
|
220
191
|
|
221
192
|
it "should fail if verification fails" do
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
end
|
193
|
+
OpenSSL::X509::Request.any_instance.expects(:verify).with { |public_key|
|
194
|
+
public_key.to_s == key.content.public_key.to_s
|
195
|
+
}.returns false
|
226
196
|
|
227
|
-
|
228
|
-
|
229
|
-
|
197
|
+
expect {
|
198
|
+
request.generate(key)
|
199
|
+
}.to raise_error(Puppet::Error, /CSR sign verification failed/)
|
230
200
|
end
|
231
201
|
|
232
|
-
it "should
|
202
|
+
it "should log the fingerprint" do
|
203
|
+
Puppet::SSL::Digest.any_instance.stubs(:to_hex).returns("FINGERPRINT")
|
233
204
|
Puppet.stubs(:info)
|
234
|
-
@instance.stubs(:fingerprint).returns("FINGERPRINT")
|
235
205
|
Puppet.expects(:info).with { |s| s =~ /FINGERPRINT/ }
|
236
|
-
|
206
|
+
request.generate(key)
|
237
207
|
end
|
238
208
|
|
239
209
|
it "should return the generated request" do
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
it "should set its content to the generated request" do
|
244
|
-
@instance.generate(@key)
|
245
|
-
@instance.content.should equal(@request)
|
210
|
+
generated = request.generate(key)
|
211
|
+
generated.should be_a(OpenSSL::X509::Request)
|
212
|
+
generated.should be(request.content)
|
246
213
|
end
|
247
214
|
end
|
248
215
|
|
@@ -17,7 +17,7 @@ describe Puppet::SSL::CertificateRevocationList do
|
|
17
17
|
|
18
18
|
describe "when converting from a string" do
|
19
19
|
it "should create a CRL instance with its name set to 'foo' and its content set to the extracted CRL" do
|
20
|
-
crl = stub 'crl'
|
20
|
+
crl = stub 'crl', :is_a? => true
|
21
21
|
OpenSSL::X509::CRL.expects(:new).returns(crl)
|
22
22
|
|
23
23
|
mycrl = stub 'sslcrl'
|
@@ -26,13 +26,13 @@ describe Puppet::SSL::Certificate do
|
|
26
26
|
|
27
27
|
describe "when converting from a string" do
|
28
28
|
it "should create a certificate instance with its name set to the certificate subject and its content set to the extracted certificate" do
|
29
|
-
cert = stub 'certificate', :subject => "/CN=Foo.madstop.com"
|
29
|
+
cert = stub 'certificate', :subject => "/CN=Foo.madstop.com", :is_a? => true
|
30
30
|
OpenSSL::X509::Certificate.expects(:new).with("my certificate").returns(cert)
|
31
31
|
|
32
32
|
mycert = stub 'sslcert'
|
33
33
|
mycert.expects(:content=).with(cert)
|
34
34
|
|
35
|
-
@class.expects(:new).with("
|
35
|
+
@class.expects(:new).with("Foo.madstop.com").returns mycert
|
36
36
|
|
37
37
|
@class.from_s("my certificate")
|
38
38
|
end
|
@@ -151,4 +151,28 @@ describe Puppet::SSL::Certificate do
|
|
151
151
|
@certificate.to_text.should == "certificatetext"
|
152
152
|
end
|
153
153
|
end
|
154
|
+
|
155
|
+
describe "when checking if the certificate's expiration is approaching" do
|
156
|
+
before do
|
157
|
+
@days = 24*60*60
|
158
|
+
@certificate = @class.new("myname")
|
159
|
+
@certificate.stubs(:expiration).returns(Time.now.utc() + 30*@days)
|
160
|
+
end
|
161
|
+
|
162
|
+
it "should be true if the expiration is within the given interval from now" do
|
163
|
+
@certificate.near_expiration?(31*@days).should be_true
|
164
|
+
end
|
165
|
+
|
166
|
+
it "should be false if there is no expiration" do
|
167
|
+
@certificate.stubs(:expiration).returns(nil)
|
168
|
+
@certificate.near_expiration?.should be_false
|
169
|
+
end
|
170
|
+
|
171
|
+
it "should default to using the `certificate_expire_warning` setting as the interval" do
|
172
|
+
Puppet[:certificate_expire_warning] = 31*@days
|
173
|
+
@certificate.near_expiration?.should be_true
|
174
|
+
Puppet[:certificate_expire_warning] = 29*@days
|
175
|
+
@certificate.near_expiration?.should be_false
|
176
|
+
end
|
177
|
+
end
|
154
178
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#! /usr/bin/env ruby -S rspec
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
require 'puppet/ssl/digest'
|
5
|
+
|
6
|
+
describe Puppet::SSL::Digest do
|
7
|
+
it "defaults to sha256" do
|
8
|
+
digest = described_class.new(nil, 'blah')
|
9
|
+
digest.name.should == 'SHA256'
|
10
|
+
digest.digest.hexdigest.should == "8b7df143d91c716ecfa5fc1730022f6b421b05cedee8fd52b1fc65a96030ad52"
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '#name' do
|
14
|
+
it "prints the hashing algorithm used by the openssl digest" do
|
15
|
+
described_class.new('SHA224', 'blah').name.should == 'SHA224'
|
16
|
+
end
|
17
|
+
|
18
|
+
it "upcases the hashing algorithm" do
|
19
|
+
described_class.new('sha224', 'blah').name.should == 'SHA224'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe '#to_hex' do
|
24
|
+
it "returns ':' separated upper case hex pairs" do
|
25
|
+
described_class.new(nil, 'blah').to_hex =~ /\A([A-Z0-9]:)+[A-Z0-9]\Z/
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '#to_s' do
|
30
|
+
it "formats the digest algorithm and the digest as a string" do
|
31
|
+
digest = described_class.new('sha512', 'some content')
|
32
|
+
digest.to_s.should == "(#{digest.name}) #{digest.to_hex}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/spec/unit/ssl/host_spec.rb
CHANGED
@@ -3,6 +3,12 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
require 'puppet/ssl/host'
|
5
5
|
|
6
|
+
def base_pson_comparison(result, pson_hash)
|
7
|
+
result["fingerprint"].should == pson_hash["fingerprint"]
|
8
|
+
result["name"].should == pson_hash["name"]
|
9
|
+
result["state"].should == pson_hash["desired_state"]
|
10
|
+
end
|
11
|
+
|
6
12
|
describe Puppet::SSL::Host do
|
7
13
|
include PuppetSpec::Files
|
8
14
|
|
@@ -322,10 +328,10 @@ describe Puppet::SSL::Host do
|
|
322
328
|
end
|
323
329
|
|
324
330
|
it "should set the terminus class for Key, Certificate, CertificateRevocationList, and CertificateRequest as :file" do
|
325
|
-
Puppet::SSL::Key.indirection.terminus_class.should == :
|
326
|
-
Puppet::SSL::Certificate.indirection.terminus_class.should == :
|
327
|
-
Puppet::SSL::CertificateRequest.indirection.terminus_class.should == :
|
328
|
-
Puppet::SSL::CertificateRevocationList.indirection.terminus_class.should == :
|
331
|
+
Puppet::SSL::Key.indirection.terminus_class.should == :disabled_ca
|
332
|
+
Puppet::SSL::Certificate.indirection.terminus_class.should == :disabled_ca
|
333
|
+
Puppet::SSL::CertificateRequest.indirection.terminus_class.should == :disabled_ca
|
334
|
+
Puppet::SSL::CertificateRevocationList.indirection.terminus_class.should == :disabled_ca
|
329
335
|
end
|
330
336
|
|
331
337
|
it "should set the terminus class for Host to 'none'" do
|
@@ -792,23 +798,71 @@ describe Puppet::SSL::Host do
|
|
792
798
|
end
|
793
799
|
|
794
800
|
describe "when converting to PSON" do
|
801
|
+
let(:host) do
|
802
|
+
Puppet::SSL::Host.new("bazinga")
|
803
|
+
end
|
804
|
+
|
805
|
+
let(:pson_hash) do
|
806
|
+
{
|
807
|
+
"fingerprint" => host.certificate_request.fingerprint,
|
808
|
+
"desired_state" => 'requested',
|
809
|
+
"name" => host.name
|
810
|
+
}
|
811
|
+
end
|
812
|
+
|
795
813
|
it "should be able to identify a host with an unsigned certificate request" do
|
796
|
-
host = Puppet::SSL::Host.new("bazinga")
|
797
814
|
host.generate_certificate_request
|
798
|
-
pson_hash = {
|
799
|
-
"fingerprint" => host.certificate_request.fingerprint,
|
800
|
-
"desired_state" => 'requested',
|
801
|
-
"name" => host.name
|
802
|
-
}
|
803
815
|
|
804
816
|
result = PSON.parse(Puppet::SSL::Host.new(host.name).to_pson)
|
805
|
-
|
806
|
-
result
|
807
|
-
|
808
|
-
|
817
|
+
|
818
|
+
base_pson_comparison result, pson_hash
|
819
|
+
end
|
820
|
+
|
821
|
+
describe "explicit fingerprints" do
|
822
|
+
[:SHA1, :SHA256, :SHA512].each do |md|
|
823
|
+
it "should include #{md}" do
|
824
|
+
mds = md.to_s
|
825
|
+
host.generate_certificate_request
|
826
|
+
pson_hash["fingerprints"] = {}
|
827
|
+
pson_hash["fingerprints"][mds] = host.certificate_request.fingerprint(md)
|
828
|
+
|
829
|
+
result = PSON.parse(Puppet::SSL::Host.new(host.name).to_pson)
|
830
|
+
base_pson_comparison result, pson_hash
|
831
|
+
result["fingerprints"][mds].should == pson_hash["fingerprints"][mds]
|
832
|
+
end
|
833
|
+
end
|
834
|
+
end
|
835
|
+
|
836
|
+
describe "dns_alt_names" do
|
837
|
+
describe "when not specified" do
|
838
|
+
it "should include the dns_alt_names associated with the certificate" do
|
839
|
+
host.generate_certificate_request
|
840
|
+
pson_hash["desired_alt_names"] = host.certificate_request.subject_alt_names
|
841
|
+
|
842
|
+
result = PSON.parse(Puppet::SSL::Host.new(host.name).to_pson)
|
843
|
+
base_pson_comparison result, pson_hash
|
844
|
+
result["dns_alt_names"].should == pson_hash["desired_alt_names"]
|
845
|
+
end
|
846
|
+
end
|
847
|
+
|
848
|
+
[ "",
|
849
|
+
"test, alt, names"
|
850
|
+
].each do |alt_names|
|
851
|
+
describe "when #{alt_names}" do
|
852
|
+
it "should include the dns_alt_names associated with the certificate" do
|
853
|
+
host.generate_certificate_request :dns_alt_names => alt_names
|
854
|
+
pson_hash["desired_alt_names"] = host.certificate_request.subject_alt_names
|
855
|
+
|
856
|
+
result = PSON.parse(Puppet::SSL::Host.new(host.name).to_pson)
|
857
|
+
base_pson_comparison result, pson_hash
|
858
|
+
result["dns_alt_names"].should == pson_hash["desired_alt_names"]
|
859
|
+
end
|
860
|
+
end
|
861
|
+
end
|
862
|
+
end
|
863
|
+
|
809
864
|
|
810
865
|
it "should be able to identify a host with a signed certificate" do
|
811
|
-
host = Puppet::SSL::Host.new("bazinga")
|
812
866
|
host.generate_certificate_request
|
813
867
|
@ca.sign(host.name)
|
814
868
|
pson_hash = {
|
@@ -818,26 +872,18 @@ describe Puppet::SSL::Host do
|
|
818
872
|
}
|
819
873
|
|
820
874
|
result = PSON.parse(Puppet::SSL::Host.new(host.name).to_pson)
|
821
|
-
result
|
822
|
-
result["name"].should == pson_hash["name"]
|
823
|
-
result["state"].should == pson_hash["desired_state"]
|
875
|
+
base_pson_comparison result, pson_hash
|
824
876
|
end
|
825
877
|
|
826
878
|
it "should be able to identify a host with a revoked certificate" do
|
827
|
-
host = Puppet::SSL::Host.new("bazinga")
|
828
879
|
host.generate_certificate_request
|
829
880
|
@ca.sign(host.name)
|
830
881
|
@ca.revoke(host.name)
|
831
|
-
pson_hash =
|
832
|
-
|
833
|
-
"desired_state" => 'revoked',
|
834
|
-
"name" => host.name,
|
835
|
-
}
|
882
|
+
pson_hash["fingerprint"] = Puppet::SSL::Certificate.indirection.find(host.name).fingerprint
|
883
|
+
pson_hash["desired_state"] = 'revoked'
|
836
884
|
|
837
885
|
result = PSON.parse(Puppet::SSL::Host.new(host.name).to_pson)
|
838
|
-
result
|
839
|
-
result["name"].should == pson_hash["name"]
|
840
|
-
result["state"].should == pson_hash["desired_state"]
|
886
|
+
base_pson_comparison result, pson_hash
|
841
887
|
end
|
842
888
|
end
|
843
889
|
|