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
@@ -24,9 +24,9 @@ describe Puppet::Node::Facts, "when indirecting" do
|
|
24
24
|
@facts.values["clientversion"].should == Puppet.version.to_s
|
25
25
|
end
|
26
26
|
|
27
|
-
it "should add the current environment
|
27
|
+
it "should not add the current environment" do
|
28
28
|
@facts.add_local_facts
|
29
|
-
@facts.values
|
29
|
+
@facts.values.should_not include("environment")
|
30
30
|
end
|
31
31
|
|
32
32
|
it "should not replace any existing environment fact when adding local facts" do
|
@@ -11,11 +11,11 @@ describe Puppet::Parser::AST::VarDef do
|
|
11
11
|
describe "when evaluating" do
|
12
12
|
|
13
13
|
it "should evaluate arguments" do
|
14
|
-
name
|
15
|
-
value =
|
14
|
+
name = Puppet::Parser::AST::String.new :value => 'name'
|
15
|
+
value = Puppet::Parser::AST::String.new :value => 'value'
|
16
16
|
|
17
|
-
name.expects(:safeevaluate).with(@scope)
|
18
|
-
value.expects(:safeevaluate).with(@scope)
|
17
|
+
name.expects(:safeevaluate).with(@scope).returns('name')
|
18
|
+
value.expects(:safeevaluate).with(@scope).returns('value')
|
19
19
|
|
20
20
|
vardef = Puppet::Parser::AST::VarDef.new :name => name, :value => value, :file => nil, :line => nil
|
21
21
|
vardef.evaluate(@scope)
|
@@ -156,6 +156,9 @@ describe Puppet::Parser::Files do
|
|
156
156
|
it "should match against provided fully qualified patterns" do
|
157
157
|
pattern = @basepath + "/fully/qualified/pattern/*"
|
158
158
|
Dir.expects(:glob).with(pattern+'{.pp,.rb}').returns(%w{my file list})
|
159
|
+
['my', 'file','list'].each do |w|
|
160
|
+
FileTest.expects(:'directory?').with(w).returns false
|
161
|
+
end
|
159
162
|
Puppet::Parser::Files.find_manifests(pattern)[1].should == %w{my file list}
|
160
163
|
end
|
161
164
|
|
@@ -18,16 +18,16 @@ describe "the 'defined' function" do
|
|
18
18
|
|
19
19
|
it "should be true when the name is defined as a class" do
|
20
20
|
@scope.known_resource_types.add Puppet::Resource::Type.new(:hostclass, "yayness")
|
21
|
-
@scope.function_defined("yayness").should be_true
|
21
|
+
@scope.function_defined(["yayness"]).should be_true
|
22
22
|
end
|
23
23
|
|
24
24
|
it "should be true when the name is defined as a definition" do
|
25
25
|
@scope.known_resource_types.add Puppet::Resource::Type.new(:definition, "yayness")
|
26
|
-
@scope.function_defined("yayness").should be_true
|
26
|
+
@scope.function_defined(["yayness"]).should be_true
|
27
27
|
end
|
28
28
|
|
29
29
|
it "should be true when the name is defined as a builtin type" do
|
30
|
-
@scope.function_defined("file").should be_true
|
30
|
+
@scope.function_defined(["file"]).should be_true
|
31
31
|
end
|
32
32
|
|
33
33
|
|
@@ -37,7 +37,7 @@ describe "the 'defined' function" do
|
|
37
37
|
end
|
38
38
|
|
39
39
|
it "should be false when a single given name is not defined" do
|
40
|
-
@scope.function_defined("meh").should be_false
|
40
|
+
@scope.function_defined(["meh"]).should be_false
|
41
41
|
end
|
42
42
|
|
43
43
|
it "should be false when none of the names are defined" do
|
@@ -47,6 +47,6 @@ describe "the 'defined' function" do
|
|
47
47
|
it "should be true when a resource reference is provided and the resource is in the catalog" do
|
48
48
|
resource = Puppet::Resource.new("file", "/my/file")
|
49
49
|
@compiler.add_resource(@scope, resource)
|
50
|
-
@scope.function_defined(resource).should be_true
|
50
|
+
@scope.function_defined([resource]).should be_true
|
51
51
|
end
|
52
52
|
end
|
@@ -10,7 +10,7 @@ describe "the fqdn_rand function" do
|
|
10
10
|
node = Puppet::Node.new('localhost')
|
11
11
|
compiler = Puppet::Parser::Compiler.new(node)
|
12
12
|
@scope = Puppet::Parser::Scope.new(compiler)
|
13
|
-
@scope[
|
13
|
+
@scope["fqdn"] = "127.0.0.1"
|
14
14
|
end
|
15
15
|
|
16
16
|
it "should exist" do
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Puppet::Parser::Functions#hiera_array' do
|
4
|
+
before :each do
|
5
|
+
Puppet[:hiera_config] = PuppetSpec::Files.tmpfile('hiera_config')
|
6
|
+
end
|
7
|
+
|
8
|
+
let :scope do Puppet::Parser::Scope.new_for_test_harness('foo') end
|
9
|
+
|
10
|
+
it 'should require a key argument' do
|
11
|
+
expect { scope.function_hiera_array([]) }.to raise_error(Puppet::ParseError)
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should raise a useful error when nil is returned' do
|
15
|
+
Hiera.any_instance.expects(:lookup).returns(nil)
|
16
|
+
expect { scope.function_hiera_array(["badkey"]) }.to raise_error(Puppet::ParseError, /Could not find data item badkey/ )
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should use the array resolution_type' do
|
20
|
+
Hiera.any_instance.expects(:lookup).with() { |*args| args[4].should be :array }.returns([])
|
21
|
+
scope.function_hiera_array(['key'])
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Puppet::Parser::Functions#hiera_hash' do
|
4
|
+
let :scope do Puppet::Parser::Scope.new_for_test_harness('foo') end
|
5
|
+
|
6
|
+
it 'should require a key argument' do
|
7
|
+
expect { scope.function_hiera_hash([]) }.to raise_error(Puppet::ParseError)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should raise a useful error when nil is returned' do
|
11
|
+
Hiera.any_instance.expects(:lookup).returns(nil)
|
12
|
+
expect { scope.function_hiera_hash(["badkey"]) }.to raise_error(Puppet::ParseError, /Could not find data item badkey/ )
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should use the hash resolution_type' do
|
16
|
+
Hiera.any_instance.expects(:lookup).with() { |*args| args[4].should be :hash }.returns({})
|
17
|
+
scope.function_hiera_hash(['key'])
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Puppet::Parser::Functions#hiera_include' do
|
4
|
+
let :scope do Puppet::Parser::Scope.new_for_test_harness('foo') end
|
5
|
+
|
6
|
+
it 'should require a key argument' do
|
7
|
+
expect { scope.function_hiera_include([]) }.to raise_error(Puppet::ParseError)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should raise a useful error when nil is returned' do
|
11
|
+
Hiera.any_instance.expects(:lookup).returns(nil)
|
12
|
+
expect { scope.function_hiera_include(["badkey"]) }.to raise_error(Puppet::ParseError, /Could not find data item badkey/ )
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should use the array resolution_type' do
|
16
|
+
Hiera.any_instance.expects(:lookup).with() { |*args| args[4].should be :array }.returns([])
|
17
|
+
scope.function_hiera_include(['key'])
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#! /usr/bin/env ruby -S rspec
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe 'Puppet::Parser::Functions#hiera' do
|
6
|
+
let :scope do Puppet::Parser::Scope.new_for_test_harness('foo') end
|
7
|
+
|
8
|
+
it 'should require a key argument' do
|
9
|
+
expect { scope.function_hiera([]) }.to raise_error(Puppet::ParseError)
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'should raise a useful error when nil is returned' do
|
13
|
+
Hiera.any_instance.expects(:lookup).returns(nil)
|
14
|
+
expect { scope.function_hiera(["badkey"]) }.to raise_error(Puppet::ParseError, /Could not find data item badkey/ )
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should use the priority resolution_type' do
|
18
|
+
Hiera.any_instance.expects(:lookup).with() { |*args| args[4].should be :priority }.returns('foo_result')
|
19
|
+
scope.function_hiera(['key']).should == 'foo_result'
|
20
|
+
end
|
21
|
+
end
|
@@ -19,7 +19,7 @@ describe "the 'include' function" do
|
|
19
19
|
it "should include a single class" do
|
20
20
|
inc = "foo"
|
21
21
|
@compiler.expects(:evaluate_classes).with {|klasses,parser,lazy| klasses == [inc]}.returns([inc])
|
22
|
-
@scope.function_include("foo")
|
22
|
+
@scope.function_include(["foo"])
|
23
23
|
end
|
24
24
|
|
25
25
|
it "should include multiple classes" do
|
@@ -42,11 +42,11 @@ describe "the 'include' function" do
|
|
42
42
|
|
43
43
|
it "should not lazily evaluate the included class" do
|
44
44
|
@compiler.expects(:evaluate_classes).with {|klasses,parser,lazy| lazy == false}.returns("foo")
|
45
|
-
@scope.function_include("foo")
|
45
|
+
@scope.function_include(["foo"])
|
46
46
|
end
|
47
47
|
|
48
48
|
it "should raise if the class is not found" do
|
49
49
|
@scope.stubs(:source).returns(true)
|
50
|
-
expect { @scope.function_include("nosuchclass") }.to raise_error Puppet::Error
|
50
|
+
expect { @scope.function_include(["nosuchclass"]) }.to raise_error Puppet::Error
|
51
51
|
end
|
52
52
|
end
|
@@ -22,7 +22,7 @@ describe "the realize function" do
|
|
22
22
|
|
23
23
|
Puppet::Parser::Collector.expects(:new).returns(@collector)
|
24
24
|
|
25
|
-
@scope.function_realize("test")
|
25
|
+
@scope.function_realize(["test"])
|
26
26
|
end
|
27
27
|
|
28
28
|
it "should assign the passed-in resources to the collector" do
|
@@ -30,7 +30,7 @@ describe "the realize function" do
|
|
30
30
|
|
31
31
|
@collector.expects(:resources=).with(["test"])
|
32
32
|
|
33
|
-
@scope.function_realize("test")
|
33
|
+
@scope.function_realize(["test"])
|
34
34
|
end
|
35
35
|
|
36
36
|
it "should flatten the resources assigned to the collector" do
|
@@ -47,7 +47,7 @@ describe "the realize function" do
|
|
47
47
|
|
48
48
|
@compiler.expects(:add_collection).with(@collector)
|
49
49
|
|
50
|
-
@scope.function_realize("test")
|
50
|
+
@scope.function_realize(["test"])
|
51
51
|
end
|
52
52
|
|
53
53
|
end
|
@@ -26,14 +26,14 @@ describe "the require function" do
|
|
26
26
|
end
|
27
27
|
|
28
28
|
it "should delegate to the 'include' puppet function" do
|
29
|
-
@scope.expects(:function_include).with("myclass")
|
29
|
+
@scope.expects(:function_include).with(["myclass"])
|
30
30
|
|
31
|
-
@scope.function_require("myclass")
|
31
|
+
@scope.function_require(["myclass"])
|
32
32
|
end
|
33
33
|
|
34
34
|
it "should set the 'require' prarameter on the resource to a resource reference" do
|
35
35
|
@scope.stubs(:function_include)
|
36
|
-
@scope.function_require("myclass")
|
36
|
+
@scope.function_require(["myclass"])
|
37
37
|
|
38
38
|
@resource["require"].should be_instance_of(Array)
|
39
39
|
@resource["require"][0].should be_instance_of(Puppet::Resource)
|
@@ -45,7 +45,7 @@ describe "the require function" do
|
|
45
45
|
@scope.expects(:find_hostclass).with("myclass").returns(@klass)
|
46
46
|
@klass.expects(:name).returns("myclass")
|
47
47
|
|
48
|
-
@scope.function_require("myclass")
|
48
|
+
@scope.function_require(["myclass"])
|
49
49
|
end
|
50
50
|
|
51
51
|
it "should append the required class to the require parameter" do
|
@@ -53,7 +53,7 @@ describe "the require function" do
|
|
53
53
|
|
54
54
|
one = Puppet::Resource.new(:file, "/one")
|
55
55
|
@resource[:require] = one
|
56
|
-
@scope.function_require("myclass")
|
56
|
+
@scope.function_require(["myclass"])
|
57
57
|
|
58
58
|
@resource[:require].should be_include(one)
|
59
59
|
@resource[:require].detect { |r| r.to_s == "Class[Myclass]" }.should be_instance_of(Puppet::Resource)
|
@@ -2,10 +2,6 @@
|
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
4
|
describe "the shellquote function" do
|
5
|
-
before :all do
|
6
|
-
Puppet::Parser::Functions.autoloader.loadall
|
7
|
-
end
|
8
|
-
|
9
5
|
let :node do Puppet::Node.new('localhost') end
|
10
6
|
let :compiler do Puppet::Parser::Compiler.new(node) end
|
11
7
|
let :scope do Puppet::Parser::Scope.new(compiler) end
|
@@ -22,23 +22,20 @@ describe Puppet::Parser::Functions do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
it "should create the function in the environment module" do
|
25
|
-
|
25
|
+
Puppet::Parser::Functions.newfunction("name", :type => :rvalue) { |args| }
|
26
26
|
|
27
|
-
|
27
|
+
@module.should be_method_defined :function_name
|
28
28
|
end
|
29
29
|
|
30
30
|
it "should warn if the function already exists" do
|
31
|
-
|
32
|
-
Puppet::Parser::Functions.newfunction("name", :type => :rvalue)
|
31
|
+
Puppet::Parser::Functions.newfunction("name", :type => :rvalue) { |args| }
|
33
32
|
Puppet.expects(:warning)
|
34
33
|
|
35
|
-
Puppet::Parser::Functions.newfunction("name", :type => :rvalue)
|
34
|
+
Puppet::Parser::Functions.newfunction("name", :type => :rvalue) { |args| }
|
36
35
|
end
|
37
36
|
|
38
37
|
it "should raise an error if the function type is not correct" do
|
39
|
-
|
40
|
-
|
41
|
-
lambda { Puppet::Parser::Functions.newfunction("name", :type => :unknown) }.should raise_error
|
38
|
+
lambda { Puppet::Parser::Functions.newfunction("name", :type => :unknown) { |args| } }.should raise_error Puppet::DevError, "Invalid statement type :unknown"
|
42
39
|
end
|
43
40
|
end
|
44
41
|
|
@@ -55,8 +52,7 @@ describe Puppet::Parser::Functions do
|
|
55
52
|
end
|
56
53
|
|
57
54
|
it "should return its name if the function exists" do
|
58
|
-
|
59
|
-
Puppet::Parser::Functions.newfunction("name", :type => :rvalue)
|
55
|
+
Puppet::Parser::Functions.newfunction("name", :type => :rvalue) { |args| }
|
60
56
|
|
61
57
|
Puppet::Parser::Functions.function("name").should == "function_name"
|
62
58
|
end
|
@@ -37,6 +37,18 @@ describe Puppet::Parser::Lexer do
|
|
37
37
|
|
38
38
|
@lexer.line.should == 13
|
39
39
|
end
|
40
|
+
|
41
|
+
{
|
42
|
+
'r' => "\r",
|
43
|
+
'n' => "\n",
|
44
|
+
't' => "\t",
|
45
|
+
's' => " "
|
46
|
+
}.each do |esc, expected_result|
|
47
|
+
it "should recognize \\#{esc} sequence" do
|
48
|
+
@lexer.string = "\\#{esc}'"
|
49
|
+
@lexer.slurpstring("'")[0].should == expected_result
|
50
|
+
end
|
51
|
+
end
|
40
52
|
end
|
41
53
|
end
|
42
54
|
|
@@ -458,6 +470,7 @@ describe Puppet::Parser::Lexer,"when lexing strings" do
|
|
458
470
|
%q{'single quoted string with an escaped "\\'"'} => [[:STRING,'single quoted string with an escaped "\'"']],
|
459
471
|
%q{'single quoted string with an escaped "\$"'} => [[:STRING,'single quoted string with an escaped "\$"']],
|
460
472
|
%q{'single quoted string with an escaped "\."'} => [[:STRING,'single quoted string with an escaped "\."']],
|
473
|
+
%q{'single quoted string with an escaped "\r\n"'} => [[:STRING,'single quoted string with an escaped "\r\n"']],
|
461
474
|
%q{'single quoted string with an escaped "\n"'} => [[:STRING,'single quoted string with an escaped "\n"']],
|
462
475
|
%q{'single quoted string with an escaped "\\\\"'} => [[:STRING,'single quoted string with an escaped "\\\\"']],
|
463
476
|
%q{"string with an escaped '\\"'"} => [[:STRING,"string with an escaped '\"'"]],
|
@@ -83,7 +83,7 @@ describe Puppet::Parser::Scope do
|
|
83
83
|
Puppet::Parser::Scope.ancestors.should include(Puppet::Resource::TypeCollectionHelper)
|
84
84
|
end
|
85
85
|
|
86
|
-
describe "when
|
86
|
+
describe "when custom functions are called" do
|
87
87
|
before :each do
|
88
88
|
@env = Puppet::Node::Environment.new('testing')
|
89
89
|
@compiler = Puppet::Parser::Compiler.new(Puppet::Node.new('foo', :environment => @env))
|
@@ -94,6 +94,16 @@ describe Puppet::Parser::Scope do
|
|
94
94
|
@scope.function_sprintf(["%b", 123]).should == "1111011"
|
95
95
|
end
|
96
96
|
|
97
|
+
it "should raise and error when called without an Array" do
|
98
|
+
expect { @scope.function_sprintf("%b", 123) }.to raise_error ArgumentError, /custom functions must be called with a single array that contains the arguments/
|
99
|
+
end
|
100
|
+
|
101
|
+
it "should raise and error when subsequent calls are without an Array" do
|
102
|
+
@scope.function_sprintf(["first call"])
|
103
|
+
|
104
|
+
expect { @scope.function_sprintf("%b", 123) }.to raise_error ArgumentError, /custom functions must be called with a single array that contains the arguments/
|
105
|
+
end
|
106
|
+
|
97
107
|
it "should raise NoMethodError if the method doesn't look like a function" do
|
98
108
|
expect { @scope.sprintf(["%b", 123]) }.to raise_error(NoMethodError)
|
99
109
|
end
|
@@ -129,6 +139,11 @@ describe Puppet::Parser::Scope do
|
|
129
139
|
@scope.lookupvar("var").should == "yep"
|
130
140
|
end
|
131
141
|
|
142
|
+
it "should fail if invoked with a non-string name" do
|
143
|
+
expect { @scope[:foo] }.to raise_error Puppet::DevError
|
144
|
+
expect { @scope[:foo] = 12 }.to raise_error Puppet::DevError
|
145
|
+
end
|
146
|
+
|
132
147
|
it "should return nil for unset variables" do
|
133
148
|
@scope["var"].should be_nil
|
134
149
|
end
|
@@ -5,10 +5,11 @@ describe Puppet::Type.type(:exec).provider(:posix) do
|
|
5
5
|
include PuppetSpec::Files
|
6
6
|
|
7
7
|
def make_exe
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
cmdpath = tmpdir('cmdpath')
|
9
|
+
exepath = tmpfile('my_command', cmdpath)
|
10
|
+
FileUtils.touch(exepath)
|
11
|
+
File.chmod(0755, exepath)
|
12
|
+
exepath
|
12
13
|
end
|
13
14
|
|
14
15
|
let(:resource) { Puppet::Type.type(:exec).new(:title => File.expand_path('/foo'), :provider => :posix) }
|
@@ -74,8 +75,8 @@ describe Puppet::Type.type(:exec).provider(:posix) do
|
|
74
75
|
end
|
75
76
|
|
76
77
|
it "should fail if the command is in the path but not executable" do
|
77
|
-
command =
|
78
|
-
|
78
|
+
command = make_exe
|
79
|
+
File.chmod(0644, command)
|
79
80
|
FileTest.stubs(:executable?).with(command).returns(false)
|
80
81
|
resource[:path] = [File.dirname(command)]
|
81
82
|
filename = File.basename(command)
|
@@ -1,40 +1,46 @@
|
|
1
1
|
#! /usr/bin/env ruby -S rspec
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
describe provider_class do
|
4
|
+
describe Puppet::Type.type(:group).provider(:groupadd) do
|
7
5
|
before do
|
8
|
-
|
9
|
-
|
6
|
+
described_class.stubs(:command).with(:add).returns '/usr/sbin/groupadd'
|
7
|
+
described_class.stubs(:command).with(:delete).returns '/usr/sbin/groupdel'
|
8
|
+
described_class.stubs(:command).with(:modify).returns '/usr/sbin/groupmod'
|
10
9
|
end
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
let(:resource) { Puppet::Type.type(:group).new(:name => 'mygroup', :provider => provider) }
|
12
|
+
let(:provider) { described_class.new(:name => 'mygroup') }
|
13
|
+
|
14
|
+
describe "#create" do
|
15
|
+
it "should add -o when allowdupe is enabled and the group is being created" do
|
16
|
+
resource[:allowdupe] = :true
|
17
|
+
provider.expects(:execute).with(['/usr/sbin/groupadd', '-o', 'mygroup'])
|
18
|
+
provider.create
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "on system that feature system_groups", :if => described_class.system_groups? do
|
22
|
+
it "should add -r when system is enabled and the group is being created" do
|
23
|
+
resource[:system] = :true
|
24
|
+
provider.expects(:execute).with(['/usr/sbin/groupadd', '-r', 'mygroup'])
|
25
|
+
provider.create
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "on system that do not feature system_groups", :unless => described_class.system_groups? do
|
30
|
+
it "should not add -r when system is enabled and the group is being created" do
|
31
|
+
resource[:system] = :true
|
32
|
+
provider.expects(:execute).with(['/usr/sbin/groupadd', 'mygroup'])
|
33
|
+
provider.create
|
34
|
+
end
|
35
|
+
end
|
20
36
|
end
|
21
37
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
@provider.gid = 150
|
29
|
-
end
|
30
|
-
|
31
|
-
it "should add -r when system is enabled and the group is being created" do
|
32
|
-
@resource.stubs(:should).returns "fakeval"
|
33
|
-
@resource.stubs(:[]).returns "fakeval"
|
34
|
-
@resource.expects(:system?).returns true
|
35
|
-
@resource.stubs(:allowdupe?).returns true
|
36
|
-
@provider.expects(:execute).with { |args| args.include?("-r") }
|
37
|
-
|
38
|
-
@provider.create
|
38
|
+
describe "#gid=" do
|
39
|
+
it "should add -o when allowdupe is enabled and the gid is being modified" do
|
40
|
+
resource[:allowdupe] = :true
|
41
|
+
provider.expects(:execute).with(['/usr/sbin/groupmod', '-g', 150, '-o', 'mygroup'])
|
42
|
+
provider.gid = 150
|
43
|
+
end
|
39
44
|
end
|
40
45
|
end
|
46
|
+
|