summaryrefslogtreecommitdiffstats
path: root/spec/unit
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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>
* | 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-183-23/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-181-2/+2
| | | | | | | | | | | | | | | | | | 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-1339-196/+659
|\| | | | | | | | | | | 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>
| * Fix #2970 spec/unit/provider/ssh_authorized_key/parsed.rb has order dependenciesJesse Wolfe2009-12-201-1/+3
| | | | | | | | | | | | | | | | Some tests in this file were leaking a global setting, some other tests depended on those changes, and some tests were incompatible with that setting. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fix #2816 MySQL server has gone awayJesse Wolfe2009-12-201-4/+6
| | | | | | | | | | | | As suggested in the ticket, set :reconnect to true. Our in-house Rails experts suggest that this is unlikely to cause any problems. The setting is silently ignored before Rails 2.3
| * Fix for #2765 (--no-fqdn regression in puppetrun)Markus Roberts2009-12-202-8/+32
| | | | | | | | | | | | | | | | | | This is basically the fix suggested on the ticket, cleaned up and ruby-ized, with tests. The only functional modification is leaving the default on entry2hash as --no-fqdn to preserve 0.25.1 behaviour as the default. Signed- ff-by: Markus Roberts <Markus@reality.com>
| * Fix for #2657 (retain old setting if config has syntax error)Markus Roberts2009-12-201-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This appears to be regression introduced by threading changes. The fix was to rearrange things to keep the old behaviour (don't clear the settings until you know the config file parses) and the new (don't nest calls to synchronize) by: 1. Splitting clear into two parts--clear, which works as before, and unsafe_clear which it calls and which expects synchronization to be handled externally. 2. Rearranging the code to recover the previous calling order 3. Trapping syntax errors and turning them into logged messages and a no-op effect. 4. Fixing reparse to not wrap a call to this code with a synchronize. 5. Tests. Signed-off-by: Markus Roberts <Markus@reality.com>
| * Fix #2966 spec/unit/util/queue.rb can't be run twiceJesse Wolfe2009-12-201-2/+10
| | | | | | | | | | | | | | | | This spec wasn't cleaing up after itself, and raised several exceptions when trying to register the same queue type again. Part of the #2879 test idempotency suite. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fixing #2963 spec/unit/util/autoload.rb depends on global stateJesse Wolfe2009-12-201-0/+2
| | | | | | | | | | | | | | An Autoload spec was depending on files having not yet been autoloaded. Detected as part of #2879. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fixed RSpec deprecation errorJames Turnbull2009-12-191-1/+1
| |
| * Fix for #2951 (SELinux test errors on OS X)Markus Roberts2009-12-181-2/+19
| | | | | | | | | | | | | | | | | | This makes the SELinux library marginally more robust by dealing consistently with a missing proc/mounts, and also resoves the test failures in a way that allows meaningful test runs on non-SELinux systems. Signed-off-by: Markus Roberts <Markus@reality.com>
| * Fix for #2890 (the cached certificates that would not die)Markus Roberts2009-12-192-75/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the two-part suggestion from the ticket; 1) a client that receives a certificate that doesn't match its current private key does not accept, store or use the certificate--instead it removes any locally cached copies and acts as if the certificate had never been found. 2) a puppetmaster that receives a csr from a client for whom it already has a signed certificate now honors the request and considers it to supercede any previously signed certificates. In order to make the cache expiration work as expected, I changed a few assumptions in the caching system: * The expiration of a cached certificate is the earlier of the envelope expiration and the certificate's expiration, as opposed to just overriding the cache value * Telling the cache to expire an item now removes it from the cache if possible, rather than just setting an expiration date in the past and hoping that somebody notices. Signed-off-by: Markus Roberts <Markus@reality.com>
| * Fix for #2950 (parens needed warning)Markus Roberts2009-12-171-1/+1
| |
| * Fixed test typoJames Turnbull2009-12-181-1/+1
| |
| * Fix for #2869 (SELinux tests failing under some load orderings)Markus Roberts2009-12-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the setup for the tests was expecting the defaultprovider for Selboolean and Selmodule to be called, rather than stubbing it. This worked as long as no other spec which initializes the providers was run before it. The fix here (stubbing rather than expecting) is minimal but not ideal; if there were some other provider for these types it could result in a test indetermenacy (different results depending on which provider) but I'm not seeing an easy way to address that. Signed-off-by: Markus Roberts <Markus@reality.com>
| * Adds partial IPv6 support to authstoreMarkus Roberts2009-12-181-0/+175
| | | | | | | | | | | | | | | | This removes some of the IPv4 centricism from authstore's handling of IP addresses. It isn't full IPv6 support (and doesn't even fully handle all the cases within its limited scope, as ruby's IPAddr library does not work with hybrid addresses), but it should simplify adding IPv6 support when the time comes.
| * Fix 2948 Failing rests in spec/unit/rails.rbJesse Wolfe2009-12-181-4/+4
| | | | | | | | | | | | Specs didn't reflect some recent changes. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fix #2923 failing tests in spec/unit/ssl/host.rbJesse Wolfe2009-12-171-2/+2
| | | | | | | | | | | | | | The fix for #2661 changed the behavior of Puppet::SSL::Host enough to confuse these mocks. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fixing 2851 spec/unit/network/rest_authconfig.rb test descriptions changeJesse Wolfe2009-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Some test names change arbitrarily since they were interpolating hashes instead of strings. This patch replaces, for example: - should insert methodfindacl/certificate_revocation_list/caauthenticatedtrue if not present with: - should insert /certificate_revocation_list/ca if not present Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fixing 2855 Inadvertent zlib dependencyJesse Wolfe2009-12-162-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | Disables the b64_zlib_yaml format if zlib cannot be loaded. I've added a --no-zlib to make it possible to test this on a single machine, but it might also be useful if someone finds themselves failing to connect to a server that doesn't have zlib installed. FactHandler' format is still hard-coded to YAML rather than using facts.class.default_format Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * 2850 spec/unit/application/puppetd.rb generates warnings if run with certain ↵Jesse Wolfe2009-12-161-0/+1
| | | | | | | | | | | | | | | | | | | | other tests Puppet[:libdir] is nil due to stubbing, causing an exception in autoload. Depending on the order of loaded libs, sometimes this exception is logged using Kernel#warn, but sometimes it's logged using Puppet.err Only Kernel#warn writes to the terminal during unit testing!
| * 2876 spec/unit/indirector/catalog/compiler.rb changes behaviourJesse Wolfe2009-12-161-1/+2
| | | | | | | | | | | | | | 1) Improve test so it doesn't fail if an autoload happens. 2) Improve test so it doesn't show a warning. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fix 2936 Insufficient mocks for webrick in spec/unit/network/http/webrick.rbJesse Wolfe2009-12-151-2/+2
| | | | | | | | | | Fixing #2877 introduced some spec failures, by using more of the webrick API than was mocked here.
| * Fix for #2921 (test not checking for what it really wanted)Markus Roberts2009-12-151-1/+1
| |
| * Fixing 2907 rspec crash when spec/unit/application/puppetrun.rb is run after ↵Jesse Wolfe2009-12-111-1/+1
| | | | | | | | | | | | | | | | | | spec/unit/util/ldap/connection.rb the ldap/connection spec creates a mock LDAP class that causes `require 'ldap'` to explode. If `require 'ldap'` happens first, then we're OK. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fixing 2858 spec/unit/application/puppetmasterd.rb fails if run twiceJesse Wolfe2009-12-101-0/+1
| | | | | | | | | | | | @puppetmasterd.options[:node] leaks from test to test Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Feature 2827 Option to disable managing internal filesJesse Wolfe2009-12-091-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | Add a flag "manage_internal_file_permissions" which is enabled by default. Disabling this flag prevents Puppet from managing the owner, group, or mode of files created from Puppet::Util::Settings::FileSetting I think this is a wide enough net to follow Luke's suggestion of "disable management of everything", and it certainly satisfies the requests I'm aware of, but if I've missed anything, let me know. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fixing 2849 puppet changes sshkey alias every run if it is blankJesse Wolfe2009-12-091-0/+19
| | | | | | | | | | | | | | | | Puppet was mis-parsing sshkey aliases when the last alias is an empty string. This is due to the counter-intuitive behavior of Ruby's String#split. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Avoiding rspec bug which causes 'be_all' tests to always passMarkus Roberts2009-12-041-1/+1
| |