summaryrefslogtreecommitdiffstats
path: root/acceptance/tests/resource
Commit message (Collapse)AuthorAgeFilesLines
* (#8740) Do not enumerate files in the root directory.Josh Cooper2011-08-111-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the command 'puppet resource file' would enumerate all files in the root directory, and generate an exception if the file type was not a directory, file, or link. Worse, it would also do this when a file or directory was specified, e.g. 'puppet resource file /etc/hosts'. Ideally, the find method of the ral terminus should not need to call the type's instances class method, instead just creating an instance of the type with the specified name and parameters. However, some types, like package, depend on this behavior. The type walks all providers and all instances that they provide, checking to see if the provider provides an instance with that name, and also warning if another provider provides an instance with the same name. Also, ideally, puppet should not blow up when encountering an unsupported file type, e.g. Unix domain socket, but that would be too big of a change for 2.6.x. This commit changes 'puppet resource file' to return a message saying that the operation is not supported: Listing all file instances is not supported. Please specify a file or directory, e.g. puppet resource file /etc The change is bit of a hack, as ideally, the file type's instances method could raise an exception when called in a 'search' context, but return an empty array in a 'find' context. But that also would be too big of a change for 2.6.x. This commit also adds spec tests for the resource application and file type, as well as an acceptance test, which creates a Unix domain socket in the root directory, while running 'puppet resource file'. Paired-with: Nick Lewis <nick@puppetlabs.com> Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* (maint) Fix platform dection for RHELDominic Maraglia2011-07-122-3/+2
| | | | | Detecting supported platform used incorrect string for RHEL. Changed string from 'redhat' to 'rhel'
* (#7956) Porting cron testsDominic Maraglia2011-06-275-30/+15
| | | | | | | | Ported cron tests were still weak. Coverted tests to use Ruby asserts for better debugging of subsequent failures. Add stronger regex's to look for expected output when applying puppet resource manifests.
* (#7956) Port resource acceptance testsDominic Maraglia2011-06-2729-96/+119
| | | | | | Many of the Puppet resource acceptance tests were RHEL/Centos specifc. These tests were ported under the enterptise-dist repo; move the tests into 2.6.x for merging.
* (#7193) Fix path issues with acceptance tests that call old shell testsMatt Robinson2011-06-062-2/+2
| | | | | | | Some rearranging of the acceptance test directories caused some ruby tests that referenced old shell tests to lose their relative paths. Paired-with: Dominic Maraglia <dominic@puppetlabs.com>
* (4123) Fix test for 4123/4 on old egrep in cent4Dominic Maraglia2011-05-242-51/+36
| | | | | | | | Older versions of egrep do not support the character class "\s". Changed: puppet resource service | egrep -B1 "ensure\s*=>.*'running" to: puppet resource service | egrep -B1 "ensure.*=>.*'running"
* Move tests from puppet-acceptance repoDominic Maraglia2011-04-2043-0/+1059