summaryrefslogtreecommitdiffstats
path: root/test/data
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '2.6.next' into nextMatt Robinson2011-03-077-0/+43
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a particularly nasty merge, so rather than hold up merges into next any longer, I'm going to push this merge with a few outstanding problems. The tests that were failing in the following areas have been marked pending, and will be addressed separately, immediately following this push. TODO: Verify that brice's rdoc change is still valid: tests to show that line numbers from class, define and node get into the ast Fix mount parsed_spec spec/unit/provider/mount/parsed_spec.rb * 2.6.next: (85 commits) (#5148) Fix failing spec due to timezone (#5148) Add support for PSON to facts (#6338) Remove inventory indirection, and move to facts indirection (#6445) Fix inline docs: puppet agent does not accept --mkusers Update CHANGELOG and version for 2.6.6rc1 (#6541) Fix content with checksum truncation bug (#6418) Recursive files shouldn't be audited (#6541) maint: whitespace cleanup on the file integration spec (#6541) Fix content with checksum truncation bug (#5466) Write specs for output of puppet resource (#5466) Monkey patch Symbol so that you can sort them (#5466) Fixed puppet resource bug with trailing , Update CHANGELOG for 2.6.5 (#4922) Don't truncate remotely-sourced files on 404 (#6338) Remove unused version control tags Maint: Align tabs in a code block in the Augeas type. (#6509) Inline docs: Fix erroneous code block in directoryservice provider for computer type Maint: Rewrite comments about symlinks to reflect best practice. (#6509) Inline docs: Fix broken lists in Launchd provider. (#6509) Inline docs: Fix broken code blocks in zpool type ... Manually Resolved Conflicts: lib/puppet/application/inspect.rb lib/puppet/defaults.rb lib/puppet/file_bucket/dipper.rb lib/puppet/network/http/handler.rb lib/puppet/node/facts.rb lib/puppet/parser/parser.rb lib/puppet/parser/parser_support.rb lib/puppet/util/command_line/puppet lib/puppet/util/command_line/puppetd lib/puppet/util/command_line/puppetmasterd lib/puppet/util/monkey_patches.rb lib/puppet/util/rdoc/parser.rb spec/unit/application/agent_spec.rb spec/unit/file_bucket/file_spec.rb spec/unit/indirector/file_bucket_file/file_spec.rb spec/unit/network/http/handler_spec.rb spec/unit/parser/parser_spec.rb spec/unit/provider/mount/parsed_spec.rb
| * Merge branch 'ticket/2.6.x/4914' into maint/2.6.next/revert-6309Paul Berry2011-02-287-0/+43
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.6.x/4914: (#4914) Improved stubbing in mount/parsed_spec tests. (#4914) Improved parsed_spec for mount (#4914) Remove mount specs (#4914) Specs for mounted? match new behaviour (#4914) Add specs for modified mount provider (#4914) Add specs for modified mount type (#4914) Update property blocks (#4914) Query property_hash for mountstate (#4914) Prefetch mountstate (#4914) Join lines for better readability Conflicts: lib/puppet/provider/mount.rb lib/puppet/provider/mount/parsed.rb spec/unit/provider/mount/parsed_spec.rb spec/unit/provider/mount_spec.rb spec/unit/type/mount_spec.rb
| | * (#4914) Improved parsed_spec for mountStefan Schulte2011-02-206-0/+36
| |/ | | | | | | | | Add specs for the new prefetching and the correct parsing of vfstab on Solaris and fstab on other systems
* | (#5274) New tests for new hosttype/parsedproviderStefan Schulte2010-11-171-0/+5
| | | | | | | | | | Just a few additional tests for the new property "comment" of the host type.
* | (#5274) Tests for hostprovider removes commentsStefan Schulte2010-11-171-0/+14
|/ | | | | | | | | | | | | | | | I noticed that the hostprovider will remove all inline comments from the /etc/hosts file, when puppet updates at least one entry. Puppet will also remove comments from entries, the user doesnt want to manage with puppet. To split up changes a bit this commit will only introduce tests for the host type and the hostprovider. A few will fail, indicating the bug: The hostprovider parses all entries and builds a hash. When building the recordhash all comments are discarded. When puppet has to update at least one entry it uses the to_line function to convert the record hash back to a file. Because the comments are not stored in the hash, they cannot be written back to the file.
* Fix #2389 - Enhance Puppet DSL with HashesBrice Figureau2010-02-171-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fixing 2812 authorized_keys without comments failJesse Wolfe2009-11-211-0/+1
| | | | | | | | | | | | | | | | | This is technically a duplicate of #1531, I think this change prevents the problem that appears in #2812, without touching the underlying issues of #1531. ssh_authorized_key was failing on keys in ~/.ssh/authorized_keys that lack a comment field - it would generate a Ssh_authorized_key resource with the name set to nil, which raises "ArgumentError: Field 'name' is required." Fixed by setting such keys' name fields to an empty string. This prevents the error from being raised and the authorized_keys files round-trip successfully. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Ticket #2685 (Type error in ssh_authorized_keys)Markus Roberts2009-10-231-0/+1
| | | | | | | | | | | In post processing a Symbol was being passed to StringScanner. StringScanner was not happy with this. The error message lost backtrace information and the test coverage was both inadequate and broken (see #2745). To be fully effective, this patch needs/assumes the patch for Signed-off-by: Markus Roberts <Markus@reality.com>
* Enhance selector and case statements to match with regexpBrice Figureau2009-08-012-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | The case and selector statements define ephemeral vars, like 'if'. Usage: case statement: $var = "foobar" case $var { "foo": { notify { "got a foo": } } /(.*)bar$/: { notify{ "hey we got a $1": } } } and for selector: $val = $test ? { /^match.*$/ => "matched", default => "default" } Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2033 - Allow regexp in if expressionBrice Figureau2009-08-012-6/+12
| | | | | | | | | | | | | | | | | | | This changeset introduces regexp in if expression with the use of the =~ (match) and !~ (not match) operator. Usage: if $uname =~ /Linux|Debian/ { ... } Moreover this patch creates ephemeral variables ($0 to $9) in the current scope which contains the regex captures: if $uname =~ /(Linux|Debian)/ { notice("this is a $1 system") } Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2333 - Make sure lexer skip whitespace on non-tokenBrice Figureau2009-06-121-0/+4
| | | | | | | | | Comments and multi-line comments produces no token per-se during lexing, so the lexer loops to find another token. The issue was that we were not skipping whitespace after finding such non-token. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Removed extra whitespace from end of linesIan Taylor2009-06-0615-941/+941
|
* Changed tabs to spaces without interfering with indentation or alignmentIan Taylor2009-06-069-4079/+4079
|
* Fix #1088 - part2 - Add rspec testsBrice Figureau2009-03-141-0/+8
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #1560Paul Lathrop2009-01-221-0/+28
| | | | | | | | | | | | | | Adds an rspec test which demonstrates #1560 and a custom 'process' method for the aliases provider to fix it. The default processing uses split() to break the line into records on the separator, which breaks if records can contain the separator. The custom method I've added uses a 'limited' split() to break the line on the first separator only. This commit fixes #1560 Signed-off-by: Paul Lathrop <paul@tertiusfamily.net>
* Fix #1737 - ssh_authorized_keys should be able to parse options containing ↵Brice Figureau2008-11-111-0/+1
| | | | | | commas Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #1402 - Allow multiline commentsBrice Figureau2008-10-291-0/+6
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #857 - Multiple class of the same name don't append codeBrice Figureau2008-10-291-0/+9
| | | | | | | | | | | | | | | | | | | | The following manifest wasn't working: class one { notice('class one') } class one { notice('second class one') } include one It all boiled down to class code not being arrays. Encapsulating code in ASTArray when needed is enough to append code, because of the property of ASTArray to evaluate all their members in turn. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #936 - Allow trailing comma in array definitionBrice Figureau2008-10-211-0/+3
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #636 - Allow extraneous comma in function argument listBrice Figureau2008-10-211-0/+5
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #1109 - allow empty if or else branchesBrice Figureau2008-10-071-0/+9
| | | | | | | | | | | | This changesets allow empty if or else branches: if true { } else { } It works by emitting on the parser stack an AST node that doesn't do anything (a no-op). This allows the less intrusive code as no part of the if evaluation code has been touched.
* Fix #1530: Correctly parse ssh type 1 keysFrancois Deppierraz2008-10-071-0/+3
| | | | | This doesn't implies that puppet can managed SSH type 1 keys, it only ignores them.
* Add parser for arbitrary expressionsBrice Figureau2008-10-012-0/+14
| | | | | | | | | | | | | | | | The expressions can be used in if 'test' and in the right side of assignements. The expressions can contain any number of sub-expressions combined by either arithmetic operators, comparison operators, or boolean operators. Random Usage Examples: $result = ((( $two + 2) / $one) + 4 * 5.45) - (6 << 7) + (0x800 + -9) or if ($a < 10) and ($a + 10 != 200) { ... }
* Add rspec unit test for the append operatorBrice Figureau2008-09-211-0/+11
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* New native ssh_authorized_key typeFrancois Deppierraz2008-05-072-0/+7
|
* Fixed #997 -- virtual defined types are no longer evaluated.Luke Kanies2008-02-122-13/+20
| | | | | | | NOTE: This introduces a behaviour change, in that you previously could realize a resource within a virtual defined resource, and now you must realize the entire defined resource, rather than just the contained resource.
* All tests should now pass again.Luke Kanies2007-10-081-2/+2
| | | | | | | | | | | | | | This is the first real pass towards using caching. The `puppet` executable actually uses the indirection work, instead of handlers and such (and man! is it cleaner). Most of this work was a result of trying to get the client-side story working, with correct yaml caching of configurations, which means this commit also covers converting configurations to yaml, which was a much bigger PITA than it needed to be. I still need to write integration tests, and I also need to cover the server-side story of a normal configuration retrieval.
* All tests now pass in this configuration branch, which meansLuke Kanies2007-09-221-14/+0
| | | | | | | | it's time to merge it back into the indirection branch. Considering that this work was what drove me to create the indirection branch in the first place, i should now be able to merge both back in the master branch.
* Fixing #749 -- environment settings no longer accumulate. Significantly ↵luke2007-08-063-0/+370
| | | | | | adding to the cron tests at the same time, such that hopefully we will no longer have these recurring bugs. I now do every combinatorial of multi-line cron jobs, including doing them all in one file. There are, unfortunately, still edge cases, but maybe we will have some peace in cron space for a while, anyway. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2750 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding support for a "mailalias" type, with /etc/aliases support initially. ↵luke2007-07-101-0/+183
| | | | | | I have not yet figured out how to best rebuild the aliases file when necessary. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2676 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #550 -- I had to list pass and dump as optional fields.luke2007-06-111-2/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2564 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #615 (subclasses with similar names) by getting rid of the class ↵luke2007-05-033-16/+13
| | | | | | "type" and "fqname", and instead using "classname" everywhere. You should no longer see unqualified class/definition names anywhere. Also, rewriting how snippet tests work, to avoid creating all of the files, since the point was the parsing tests, not functional tests. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2458 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding example cron tab from #492 and making the read/write tests ignore ↵luke2007-03-181-0/+20
| | | | | | whitespace. This cron now parses successfully, as I thought it would with the move to providers. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2291 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing cron support (I hope). It now uses providers, and seems to work, at ↵luke2007-03-176-0/+52
| | | | | | least on my os x box. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2284 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving some of the stand-alone classes into the util/ subdirectory, to clean ↵luke2007-02-071-0/+1
| | | | | | up the top-level namespace a bit. This is a lot of file modifications, but most of them just change class names and file paths. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2178 980ebf18-57e1-0310-9a29-db15c13687c0
* Partially fixing #460, take 3 -- fully-qualified classes can now be included.luke2007-01-301-2/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2128 980ebf18-57e1-0310-9a29-db15c13687c0
* Partially fixing #460, take 2 -- fully-qualified definitions can now be used.luke2007-01-302-0/+16
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2127 980ebf18-57e1-0310-9a29-db15c13687c0
* splitting the tagmail report into multiple methods and adding test codeluke2007-01-302-0/+33
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2122 980ebf18-57e1-0310-9a29-db15c13687c0
* Re-enabling the dirchmod test and fixing its syntaxluke2007-01-041-6/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2041 980ebf18-57e1-0310-9a29-db15c13687c0
* Handle continuation lines in inifiles properly; stick a little closer to how ↵lutter2007-01-041-0/+3
| | | | | | python's ConfigParser parses git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2032 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #348. Overrides now support an extra end-comma.luke2006-12-231-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1969 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #343. Collections and definition evaluation both now happen on every ↵luke2006-12-231-0/+13
| | | | | | iterative evaluation, with collections being evaluated first. This way collections can find resources that either are inside defined types or are the types themselves. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1967 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #349. Doing some hackery so defined types can now (again) be used as ↵luke2006-12-231-0/+8
| | | | | | dependencies. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1966 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #372 and #374. All is not perfect, since OS X still cannot set UID, ↵luke2006-12-191-0/+1
| | | | | | but it is much better. There is still plenty of bug-fixing to do on other platforms, I expect. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1954 980ebf18-57e1-0310-9a29-db15c13687c0
* Reworking the package tests. Now providers are tested individuallyluke2006-12-142-2/+66
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1921 980ebf18-57e1-0310-9a29-db15c13687c0
* Hosts now work again, and it should be straightforward to create a netinfo ↵luke2006-11-131-0/+5
| | | | | | provider, too. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1864 980ebf18-57e1-0310-9a29-db15c13687c0
* Ports are still broken, but I need to work on something else while I am ↵luke2006-11-132-0/+11866
| | | | | | thinking about how to fix them. Stupid /etc/services. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1863 980ebf18-57e1-0310-9a29-db15c13687c0
* Another round of bug-fixes in preparation for 0.20.0luke2006-10-181-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1813 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a "realize" function that can be used to make one or more resource ↵luke2006-10-181-0/+14
| | | | | | non-virtual. It is just syntactic sugar for a collection by title. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1808 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing virtual object collection. I apparently broke it when I added rails ↵luke2006-10-181-0/+10
| | | | | | collection back, and I never created any end-to-end tests. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1805 980ebf18-57e1-0310-9a29-db15c13687c0