Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Also this patch splits out the long line in upstart_spec.rb to be
one line per service, so more diff-friendly.
|
|
|
|
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.
|
|
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.
|
|
One fixed test still failing on expectations
|
|
- 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
|
|
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.
|
|
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,'
|
|
|
|
* 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
|
|
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.
|
|
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.
|
|
This adds a simple test case for the special case of network-interface-security
to the upstart spec.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Refactor upstart provider with suggestions from dpittman.
Add specs for upstart provider.
|
|
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>
|
|
|