summaryrefslogtreecommitdiff
path: root/spec/unit/provider/service/upstart_spec.rb
AgeCommit message (Collapse)AuthorFilesLines
2014-08-11(PUP-2879) Add two nfsd-related upstart services to the blacklistKylo Ginsberg1-0/+2
2014-08-08(PUP-2879) Add cryptdisks-udev to the services blacklistKylo Ginsberg1-1/+5
Also this patch splits out the long line in upstart_spec.rb to be one line per service, so more diff-friendly.
2014-07-23(maint) Add test to ensure upstart is default init daemon in UbuntuWill Hopper1-0/+5
2014-03-26(PUP-1332) Add instantiated upstart services to exclude listMatthaus Owens1-1/+1
Previously puppet would fail when trying to list all services because some services require parameters for status queries to succeed. These include idmapd-mounting and startpar-bridge. This commit adds those services to the exclude list so that they are ignored when querying upstart for their status.
2014-02-28(PUP-876) Enable upstart service provider on RedhatAdrien Thebo1-0/+8
This commit allows the upstart service provider to function on Redhat systems. Redhat 6 included support for upstart and while it wasn't widely embraced it is available for use. The 'serial' and 'tty' services on Redhat 6 systems have instances which the service type/provider cannot handle, so we have to ignore them for the upstart provider to work out of the box.
2014-01-06(PUP-716) Fix up tests after FileSystem API changeHenrik Lindberg1-4/+4
One fixed test still failing on expectations
2013-11-08(#19447) Puppet::FileSystem::File.exist?Ethan J. Brown1-4/+4
- All previous File and FileTest calls to exist? or exists? go through the new FileSystem::File abstraction so that the implementation can later be swapped for a Windows specific one to support symlinks
2013-02-22(#16553) Exclude portmap-wait from upstart servicesMatthaus Owens1-1/+1
The portmap-wait upstart service is not a service by itself (it's a helper for the portmap service) and does not respond to the status command, it returns 1 along with an error message. This commit adds portmap-wait to the excludes method of the init provider, which is also used by the upstart provider to exclude services from self.instances. This also adds the portmap-wait service to the upstart provider spec test to verify that it is correctly excluded from self.instances.
2012-09-26(Maint) Remove rspec from shebang lineJeff McCune1-1/+1
Without this patch Ruby 1.9 is still complaining loudly about trying to parse the spec files. The previous attempt to clean up this problem in edc3ddf works for Ruby 1.8 but not 1.9. I'd prefer to remove the shebang lines entirely, but doing so will cause encoding errors in Ruby 1.9. This patch strives for a happy middle ground of convincing Ruby it is actually working with Ruby while not confusing it to think it should exec() to rspec. This patch is the result of the following command run against the source tree: find spec -type f -print0 | \ xargs -0 perl -pl -i -e 's,^\#\!\s?/(.*)rspec,\#! /usr/bin/env ruby,'
2012-07-02Merge branch '3.0rc' of github.com:puppetlabs/puppet into 3.0rcAndrew Parker1-1/+1
2012-07-02Merge commit '2.7.17' into 3.0rcAndrew Parker1-21/+31
* commit '2.7.17': Updating CHANGELOG, lib/puppet.rb, conf/redhat/puppet.spec for Puppet 2.7.17 (maint) Add symlink stub to gentoo service provider spec Add comment to upstart provider explaining exclusion of 'wait-for-state' Upstart code cleanup, init provider improvement Add spec test for network-interface-security Add basic service resource test to upstart acceptance Handle network-interface-security in upstart Add exclude list to upstart provider (#15027, #15028, #15029) Fix upstart version parsing (maint) Add --test to puppet run Update CHANGELOG, conf/redhat/puppet.spec for 2.7.16 Update facter dep to reflect epoch 1 Conflicts: CHANGELOG acceptance/tests/helpful_error_message_when_hostname_not_match_server_certificate.rb conf/redhat/puppet.spec lib/puppet.rb spec/unit/provider/service/upstart_spec.rb
2012-07-02(maint) Standardize on /usr/bin/env ruby -S rspecJeff McCune1-1/+1
Without this patch some spec files are using `ruby -S rspec` and others are using `rspec`. We should standardize on a single form of the interpreter used for spec files. `ruby -S rspec` is the best choice because it correctly informs editors such as Vim with Syntastic that the file is a Ruby file rather than an Rspec file.
2012-06-19Upstart code cleanup, init provider improvementMatthaus Litteken1-23/+27
This commit adds an is_init? function to the init provider, to prevent the init provider from handling upstart jobs redundantly (which happens with services such as network-interface and network-interface-security). It also adds tests for the exlusion of instances in the upstart provider and exclusion of upstart services from the init instances. It also cleans up some upstart provider code (self.instances, self.search), eliminating redundant code and refactoring some methods (upstart_status, status, normal_status). This also removes the custom status command from upstart, which almost certainly wasn't doing what it was expected. The upstart status command is effective at gauging the status of upstart services.
2012-06-19Add spec test for network-interface-securityMatthaus Litteken1-0/+6
This adds a simple test case for the special case of network-interface-security to the upstart spec.
2012-06-12(#14844) Add test that execpipe works for upstart providerAndrew Parker1-6/+11
The test as written covered up the fact that the execpipe method on Provider did not work correctly. This modifies the test to move the mocking down, out of the class that is under test so that it exercises the Provider class.
2012-05-30(maint) Disable upstart spec test on windowsMatthaus Litteken1-1/+1
replace_file is disabled on windows, so the upstart spec test fails when the provider calls out to replace_file. This commit confines the test to non-windows platforms, where replace_file is defined.
2012-05-24(#14297) Clean up upstart provider and testsMatthaus Litteken1-127/+166
This commit eases readability of the changes to the upstart provider, breaking functionality into helper functions where appropriate. The spec tests were similarly cleaned up.
2012-05-23(#14297) Update spec tests for upstart providerMatthaus Litteken1-4/+374
This commit adds tests for the upstart provider to verify that it has the enableable methods and that it behaves correctly with various versions of upstart. The tests include multiline start blocks, manual stanzas, and override files.
2012-04-18(#14036) Add upstart testsJeff Weiss1-0/+38
Refactor upstart provider with suggestions from dpittman. Add specs for upstart provider.
2012-02-01Alternate, and portable, stubbing of execution for upstart spec.Daniel Pittman1-1/+5
Previously this spec used to execute an external command in order to set the Ruby `$?` global to a `Process::Status` object with a successful exit. This was fine, but not portable to Windows, and not exactly efficient. Instead, we now stub the exitcode on the $? object, whatever it is, to report successful exit, and carry on. That works, stubbing the instance, to make this both fairly robust and entirely portable. Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
2012-01-31(#12268) Fix upstart test to work with String#each_linePatrick Carlisle1-0/+48