summaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix #2389 - Enhance Puppet DSL with HashesBrice Figureau2010-02-173-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bring a new container syntax to the Puppet DSL: hashes. Hashes are defined like Ruby Hash: { key1 => val1, ... } Hash keys are strings, but hash values can be any possible right values admitted in Puppet DSL (ie function call, variables access...) Currently it is possible: 1) to assign hashes to variable $myhash = { key1 => "myval", key2 => $b } 2) to access hash members (recursively) from a variable containing a hash (works for array too): $myhash = { key => { subkey => "b" }} notice($myhash[key][subjey]] 3) to use hash member access as resource title 4) to use hash in default definition parameter or resource parameter if the type supports it (known for the moment). It is not possible to string interpolate an hash access. If it proves to be an issue it can be added or work-arounded with a string concatenation operator easily. It is not possible to use an hash as a resource title. This might be possible once we support compound resource title. Unlike the proposed syntax in the ticket it is not possible to assign individual hash member (mostly to respect write once nature of variable in puppet). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2929 - Allow checksum to be "none"Brice Figureau2010-02-175-1/+58
| | | | | | | | | | | | | | | | File checksum is "md5" by default. When managing local files (not sourced or content) it might be desirable to not checksum files, especially when managing deep hierarchies containing many files. This patch allows to write such manifests: file { "/path/to/deep/hierarchy": owner => brice, recurse => true, checksum => none } Then puppet(d) won't checksum those files, just manage their ownership. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #3186 - require function set relationship only on the last classBrice Figureau2010-02-172-3/+30
| | | | | | | | Due to the fact that resource.set_parameter is overwriting the previous set_parameters, we were losing the previous relationships we set there, either in a previous call of require or in the same call. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #3150 - require function doesn't like ::class syntaxBrice Figureau2010-02-171-0/+11
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixed the return types were valid, and removed the copy paste error with the ↵Bryan Kearney2010-02-171-3/+3
| | | | exception logic
* Add AIX package management support (installp&nim)Andrew Forgue2010-02-172-0/+108
| | | | | | | | | | This patch adds support for the native AIX package manager. It allows installation from either the name of an lpp_source (if you have a NIM environment configured, or from a directory containing .bff files. Signed-off-by: Andrew Forgue <andrew.forgue@gmail.com>
* Fixing #3148 Settings#without_noop when run with no noop settingLuke Kanies2010-02-171-0/+7
| | | | | | | Some tests didn't define this setting which caused this method to fail. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Move scope parenting & class_scope from Compiler to ScopeMarkus Roberts2010-02-173-44/+60
| | | | | | | | | | | | | | | | This refactor fixes about a quarter of the test failures on master and (I hope) will simplify some of the integration issues on the testing branch. It is my best guess at The Right Thing To Do (or at least a step in that direction) but I could be persuaded otherwise. The basic idea is to take responsibility for maintaining scope hierarchy and class_name -> class_scope mapping out of the compiler class and put it in the scope class where it arguably belongs. To maintain the semantics, class scopes are all tracked by the "top level" scope, though this could be relaxed if the nesting semantics were ever needed. If this winds up being the right thing to do, related routines (e.g. newscope) should be sorted out as well.
* [#3392] Better Rakefile, remove puppetmasterd specRein Henrichs2010-02-171-145/+0
| | | | | - Minor improvements to Rakefile spec task - Remove puppetmasterd spec, to be run as part of the testing matrix
* Fixing tests in pkg providerMarkus Roberts2010-02-171-6/+6
|
* bug #3407 Part 2Jesse Wolfe2010-03-221-1/+1
| | | | | | | My change to the Puppet::Module::InvalidName error's initializer broke a spec in a different file. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Fixing #3407 Failing tests in spec/unit/node/environment.rbJesse Wolfe2010-03-221-6/+6
| | | | | | | | | A naked rescue in Puppet::Node::Environment was hiding expectation violations from the Mocha mocks. Specifically, 'modulepath' expectations were failing, as Puppet::Module now calls Puppet::Node::Environment#modulepath internally. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Bug #3406 augeas spec fails if there is not a default providerJesse Wolfe2010-03-221-0/+2
| | | | | | So I stubbed out the default provider. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Bug #3402 Stub returning invalid type for :noopJesse Wolfe2010-03-221-1/+2
| | | | | A stub was causing a test failure by returning a string for a parameter that requires a boolean.
* Bug #3401 Spec failed due to missing manditory setting in mockJesse Wolfe2010-03-221-2/+6
| | | | | Puppet::Util::Settings#use now requires the :noop setting to exist, and this test was not providing one in its mocked default structure.
* Bug #3400 Bad mocks causing failing testsJesse Wolfe2010-03-221-1/+3
| | | | | | New code was calling a mocked method that was stubbed too broadly, causing the whole thing to act strangely. I've tightened the existing stub and stubbed the new method call.
* Merge branch '0.25.x'Markus Roberts2010-02-0915-59/+156
|\ | | | | | | | | | | | | | | | | | | Conflicts: lib/puppet/agent.rb lib/puppet/application/puppet.rb lib/puppet/configurer.rb man/man5/puppet.conf.5 spec/integration/defaults.rb spec/unit/configurer.rb
| * Fixed #3162 - tidy does not remove empty files when "size => 0" is setJames Turnbull2010-02-091-0/+6
| | | | | | | | | | | | Thanks to Stig Sandbeck Mathisen for the fix See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513309
| * Fixing #2669 puppetmasterd integration has leaky stateJesse Wolfe2010-02-041-9/+20
| | | | | | | | | | | | | | | | | | | | | | This patches two leaks in the puppetmasterd integration tests that were preventing the script from succesfully connecting to its child puppetmasterd process more than once: 1) a race condition in shutting down puppetmasterd before restarting it 2) holding onto stale SSH certificate information. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * 2047: Add a not_include into matchBryan Kearney2010-02-011-0/+10
| |
| * Fix for #3094 (libdir should take ":" delimited path)Markus Roberts2010-01-301-1/+2
| | | | | | | | | | | | | | | | Actually, File::PATH_SEPARATOR, which is generally, but not always, ":"). Since libdir is also the default for the plugin handler, users will need to specify it explicitly if a multipart libdir is given (and it will need to be one of the segments given in the libdir for the plugins to be found).
| * Fix #1842 Net::HTTP#enable_post_connection_check doesn't work anymoreJesse Wolfe2010-01-306-22/+9
| | | | | | | | | | | | | | | | | | | | The setting enable_post_connection_check doesn't exist on very many versions of ruby, and on those systems there's no way to disable domain name checking on HTTPS. The recommended work-around is to replace certificates when they have incorrect hostnames. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fixing #2914 - pre/post hooks now work for transactionsLuke Kanies2010-01-183-2/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was built to be used with etckeeper to version control files in /etc, but can be used for essentially anything. This patch was built to be added to 0.25.4, so it's a least-modify approach. A better approach would be to refactor application/puppet.rb just a bit so it uses Configurer more. This is a simple patch - it just defines 'prerun_command' and 'postrun_command' settings, and runs the appropriate command around each transaction if they're set. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
| * Fix for #3075 (sshkey host_aliases ignored)Markus Roberts2010-01-151-4/+23
| | | | | | | | | | | | | | In the alias --> host_aliases conversion, I overlooked parsed file provider for sshkeys. Now with tests.
| * Revert "Fix #2845 Cron entries using "special" parameter lose their title ↵James Turnbull2010-01-141-21/+0
| | | | | | | | | | | | | | | | when changed" This reverts commit c99f394bf8c10d13f3fa7d3ab7ab43ecf454c081. The fix broke cron jobs in 0.25.3 and was reverted for the 0.25.4 release.
* | Fixed Rails database testsJames Turnbull2010-01-281-10/+25
| |
* | Fix #3117 - cert fingerprinting uses a method not available in ruby <= 1.8.6Brice Figureau2010-01-281-2/+5
| | | | | | | | | | | | | | | | OpenSSL::Digest.hexdigest is not available on older ruby versions. This patch accesses directly to the digest instead (which hopefully support hexdigest). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Fixed test error message.James Turnbull2010-01-281-1/+1
| |
* | First shot at the OpenSolaris pkg(5) providerMartin Englund2010-01-271-0/+63
| |
* | Feature #2839 - fingerprint certificateBrice Figureau2010-01-196-37/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds several things: * certificate fingerprinting in --list mode * a puppetca action called "--fingerprint" to display fingerprints of given certificates (or all including CSR) * a --fingerprint puppetd option to display client certificates * each time a CSR is generated, its fingerprint is displayed in the log It is also possible to use --digest in puppetca and puppetd to specify a specific digest algorithm. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Fix a few puppetd specs testsBrice Figureau2010-01-191-1/+2
| | | | | | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Revert "Feature #2839 - fingerprint certificate"James Turnbull2010-01-193-129/+29
| | | | | | | | | | | | This reverts commit a9fb82b0026e75a670fec553b17de3b0f091c2a5. An older branch was pulled
* | Fixing #1054 - transaction reports are always sentLuke Kanies2010-01-184-23/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | This refactors how reports, catalogs, configurers, and transactions are all related - the Configurer class manages the report, both creating and sending it, so the transaction is now just responsible for adding data to it. I'm still a bit uncomfortable of the coupling between transactions, the report, and configurer, but it's better than it was. This also fixes #2944 and #2973. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fix #2894 - exclude .pp files under modules files directoriesBrice Figureau2010-01-181-0/+6
| | | | | | | | | | | | | | | | | | | | Selinux modules files also ends in ".pp". Puppetdoc tries to parse them as if they are regular puppet files and then fails. This patch makes sure puppetdoc tells RDoc to exclude parsing .pp files in the modules files section. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Adapt to method name change since 8971d8Brice Figureau2010-01-182-2/+19
| | | | | | | | | | | | | | | | | | When the definition/hostclass/node AST types were removed, the parentclass method was renamed to 'parent'. This patch fixes the incorrect rdoc usage (and some deeper integration test so that it won't happen again). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Feature #2839 - fingerprint certificateBrice Figureau2010-01-183-29/+129
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds two things: * certificate fingerprinting in --list mode * a puppetca action called "--fingerprint" to display fingerprints of given certificates It is also possible to use --digest to specify a specific digest algorithm. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Feature #2395 - revoke when cleaning a certificate with puppetcaBrice Figureau2010-01-181-0/+10
| | | | | | | | | | | | | | | | As the ticket says: "the certificates would still be valid even if cleaned, therefore, it makes more sense revoke them instead." Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Merge branch '0.25.x'James Turnbull2010-01-1344-200/+668
|\| | | | | | | | | | | Conflicts: lib/puppet/ssl/host.rb spec/spec_helper.rb
| * Fix #1464 Mount complains about missing fieldsJesse Wolfe2010-01-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This family of errors could appear because Puppet parses every line in fstab into resources, even lines that are not specifically managed by Puppet, and fstab files are much more permissive than Puppet in what constitutes a valid mount. This change makes several fields optional that were previously mandatory. Also, it ignores lines in fstab that have fewer than the required number of parameters. Includes a more readable regex than the previous patch. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fix #2845 Cron entries using "special" parameter lose their title when changedJesse Wolfe2010-01-121-0/+21
| | | | | | | | | | | | | | Merged the "freebsd_special" pattern into the other crontab records, since its definition was incomplete Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fix #2887 'service' tests paths too earlyJesse Wolfe2010-01-082-15/+16
| | | | | | | | | | | | | | | | | | The 'service' type was testing to see if init script directories exist too early, causing failures if you expected to be able to create those directories via puppet. This patch moves that logic into the 'init' provider. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Partial rollback of refinements to fix for #2994Markus Roberts2010-01-021-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for #2994 had been refined to only checksum links when @links was set to :follow to make the tests pass, but this caused partial reintroduction of the original issue since information about the source (the real file vs. followed link distinction) isn't available client side and thus there are paths on which @links winds up :managed when it had originally been :followed. In these cases the checksum is needed but not produced. Consequently, this patch relaxes the condition, and always tries to produce a checksum, with a rescue guard to gracefully handle cases where this is not possible (e.g. broken links).
| * ReFix 2675 ending slash in directory should get stripped offJesse Wolfe2010-01-012-0/+18
| | | | | | | | | | | | | | | | | | There was an intermittent bug in Puppet::Parser::Resource::Reference, during initialization, and object could sometimes have its title set before its type is set. This prevented the title from going through type-specific canonicalization. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Additional fix for #2994 (followed symlinks do not have checksums)Markus Roberts2010-01-011-16/+30
| | | | | | | | | | | | | | | | | | | | The first patch for #2994, to which this is an extension, exposed the fact that checksums were not being included in the metadata for followed links; checksums are needed for managing the contents of files that are represented on the server as links (links => follow). This patch adds checksums for followed links and tests to confirm that it works as expected.
| * Fix for #2995 (don't fail to load PSON when UTF-8 missing)Markus Roberts2009-12-313-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | We don't actually rely on iconv's UTF-8 support, so its absence shouldn't cause the PSON feature to fail on system (e.g. HPUX) where it isn't fully implemented. This change exposed a dependency on library load order that was causing Puppet::Util::Log to raise an error. I've removed the dependency of Puppet::Type from Puppet::Util::Log. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fix for #2967 (RFC-1123 problem and regression on wildcarded domains)Markus Roberts2009-12-241-0/+22
| | | | | | | | | | | | | | | | | | | | The core bug here was a regression introduced by my IPv6 patch. Wildcarded domains are stored as ["com","reductivelabs","*"] but the code in question was assuming it was in normal order. Added tests to prevet recurrence. Signed-off-by: Markus Roberts <Markus@reality.com>
| * Fixing failing testsMarkus Roberts2009-12-231-22/+39
| |
| * Fixing #2964 updated resources cannot be collected until they are exported twiceMarkus Roberts2009-12-231-0/+20
| | | | | | | | | | | | | | This logic had a bug where it would not insert data if it had just been deleted. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fixing #2960 Test Failed: 'Puppet::Type::Mount::ProviderParsed when ↵Jesse Wolfe2009-12-221-1/+3
| | | | | | | | | | | | | | | | | | | | modifying the filesystem tab should write the mount to disk when :flush is called I found this doing idempotency tests (#2879), but there are apparently other ways for external state to leak into this test, as reported by James. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fixing testsMarkus Roberts2009-12-221-30/+11
| | | | | | | | Signed-off-by: Markus Roberts <Markus@reality.com>