Age | Commit message (Collapse) | Author | Files | Lines |
|
The other test suites, especially acceptance, cover everything that these
tests cover for the a whole bunch of the RAL tests in the older system.
Others were entirely disabled, and can simply be stripped out.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
The only test not present in the existing spec was an effort to parse a large
sample file, and ensure it would round-trip correctly through the parsedfile
provider.
This is now ported over.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
The `base` service provider is terribly anæmic, but we had some tests, and it
does serve as the parent for almost every other provider. So, port those
tests over.
Also, add a dash of cross-platform support by invoking the current Ruby
interpreter to do file system manipulation things - rather than leaning on
Unix tools that are not available everywhere.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
The provider tests exercise a whole pile of code that wasn't covered by the
specs. This ports those tests over, and extends them to do further
combination testing in a few places.
These are very repetitive, table driven tests - but so is the underlying
feature we are trying to test.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
These are fairly weak tests, but they exist - which ensures that we can't slip
through a syntax error in that provider. So, better ported than destroyed.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
These tests covered a bunch of content that wasn't already covered, so they
should be ported. Includes some fun around enumerators and Ruby 1.8.5.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
The old Test::Unit mailalias test is fairly up-front about being a weak test,
but it was more than we had in the spec area at all. So, it can be ported
as-is to retain at least the same level of testing of the type.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
Most of the tests were redundant to either existing acceptance tests, or to
existing spec tests, but a couple of combination tests were worth porting.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
The RAL manager tests exercise code that isn't otherwise exercised, so most of
the tests can be ported over.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
The type tests exercise parts of the type code in ways that the other tests
don't, so they should be ported over.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
The only meaningful test was that the Puppet version number was sane.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
This brings over the meaningful tests of the provider class over from
Test::Unit to RSpec.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
In Ruby 1.9 the Test::Unit library was replaced by MiniTest. This changes
some "esoteric" parts of the code, sadly including the parts of the library we
depend on to confine certain tests to only some systems.
Instead of investing heavily in rebuilding that facility over the new MiniTest
library it makes sense to just check for and either destroy or port the old
tests to the new rspec harness.
This is our desired future - that only one test framework exist - and we might
as well take full advantage of this opportunity to clean up our legacy code.
It also drops tests that duplicate testing already present in the spec suite.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
There are no functional changes, just fixing odd whitespace.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
Conflicts:
lib/puppet/daemon.rb
spec/unit/daemon_spec.rb
spec/unit/parser/ast/leaf_spec.rb
spec/unit/provider/package/dpkg_spec.rb
spec/unit/util/settings_spec.rb
|
|
|
|
This is just to clarify the intent of the code, mostly in defaults.rb.
The old signature still exists, but prints a deprecation warning.
|
|
Major changes include:
* support multiple config files (/etc/puppet, ~/.puppet). we no longer
use "run_mode" to determine the location of the config file.
* remove all references to application run_mode/state from defaults
* make the typing of settings a little more strict
* create a new setting type for directories, to make us a little less vulnerable to the terrible matching algorithm in FileSetting
|
|
'daniel-pittman/refactor/2.7.x/4862-remove-the-event-loop-library' into 2.7.x
* daniel-pittman/refactor/2.7.x/4862-remove-the-event-loop-library:
(#4862) Finally remove the event-loop library.
(#4862) define_method is not a public method in Ruby.
(#4862) `returning` is not a standard Ruby method.
(#4862) Stop using EventLoop in the Puppet daemon.
|
|
* 2.7.x:
(#10722) Add spec to verify that an error is logged on bad http
(#10722) Refactor http_spec to use expectations
Updating CHANGELOG for 2.7.12rc2
(#7592) Remove redundant call to String#to_s
(#11988) Work around Augeas reload bug when changing save modes
(#11988) Don't overwrite symlinks in augeas provider
(#8312) Fix zypper provider so ensure => 'latest' now works
(#12844) Fix a unit test relating to lockfiles
(#12914) Allow puppet to be interrupted while waiting for child
(#12933) Better error message when agent is administratively disabled
(#7592) Remove redundant call to String#to_s
(#12844) Agent lockfiles: backwards compatibility with 2.7.10/2.7.11
(#10722) Display errors on HTTP report submission failures
Revert "Merge remote-tracking branch 'masterzen/tickets/2.7.x/3757' into 2.7.x"
Revert "(#12844) Backwards compatibility for 'puppet agent --enable'"
(#11988) Work around Augeas reload bug when changing save modes
(#11988) Don't overwrite symlinks in augeas provider
(#12881) Fix cron type default name error on windows
(#12844) Backwards compatibility for 'puppet agent --enable'
(#8312) Fix zypper provider so ensure => 'latest' now works
Conflicts:
lib/puppet/provider/augeas/augeas.rb
lib/puppet/reports/http.rb
lib/puppet/util/pidlock.rb
spec/unit/application/agent_spec.rb
spec/unit/provider/augeas/augeas_spec.rb
spec/unit/reports/http_spec.rb
|
|
The recent changes to support backwards compatibility with 2.7.10
and 2.7.11 introduced a very minor change in behavior with regards
to when a stale lockfile gets cleaned up. Fixed this test to
recognize the change.
|
|
This reverts commit 86a806f595f8b7bb280c8c445eef51dfd71bf39d, reversing
changes made to ac81771a9cc70b5fb58f86439ebb0585ce92d4e8.
See tickets #3757, #12844, #4836, #11057. These changes were deemed to
be breaking public APIs, and thus are being reverted from 2.7.x. They'll
be reintroduced in 3.x.
(The changes in question were relating to how puppet agent creates /
manages its lockfiles.)
Conflicts:
lib/puppet/util/pidlock.rb
spec/unit/agent_spec.rb
spec/unit/util/pidlock_spec.rb
|
|
* Port test from test/ral/type/yumrepo.rb into yumrepo_spec.rb
* Delete old test and supporting files
|
|
* 2.7.x: (63 commits)
Maint: Fix bad copy and paste
(#12725) Fix puppet agent --listen on Windows
(#11740) Wait on the handle from the PROCESS_INFORMATION structure
(#12564) Stub CHILDSTATUS in all test cases, not just failure cases.
Updating CHANGELOG and lib/puppet.rb for 2.7.11
(#12412) Mark symbolic file modes test as pending on Windows
Symbolic file mode test fixes when no mode change happens.
Fix spec ordering failure on environment
Updating CHANGELOG and lib/puppet.rb for 2.7.11
Disable specs that use replace_file on Windows
Disable replace_file on Windows
Remove unnecessary fallbacks in change_{user,group}
Document uid/gid-related methods in Puppet::Util
Copy owner/group in replace_file
(#12463) eliminate `secure_open` in favour of `replace_file`
(#12460) use `replace_file` for the .k5login file
(#12462) user_role_add: use `replace_file` for /etc/shadow
(#12463) add secure `replace_file` to Puppet::Util
(#12459) drop supplementary groups when permanently dropping UID
(#12458) default to users primary group, not root, in `asuser`
...
Conflicts:
lib/puppet/application/queue.rb
lib/puppet/provider/package/openbsd.rb
lib/puppet/util.rb
spec/unit/network/http/webrick_spec.rb
spec/unit/util_spec.rb
test/lib/puppettest/servertest.rb
|
|
Now that all the consumers of the event-loop abstraction have been removed,
delete the obsolete code from Puppet.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
The CA key length was lower than it should be - 1024 bits is no longer secure
enough for real world use. This raises both client and CA certs to use 4096
bit keys. Those are slow, but effective for long term security.
People who know enough to decide that the trade-off of speed vs limited window
of security can still totally reduce the size of the key without much trouble,
but we default to being more cautious.
This also pegs the key lengths low in testing, since building a 4K key is
awful slow if you want to do it time and time again over the course of dozens
of tests.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
* Improve logic of deprecation_warning
* Add utility method for logging deprecation warnings to a file
* Refactored all references of Puppet::Util.execute to call Puppet::Util::Execution.execute
|
|
There are still deprecated stubs for execpipe, execfail, and execute in Puppet::Util for backwards compatibility. rspecs are all passing, but would still like to go through and check for deprecation warnings that were triggered by this changeset (and fix them, obviously).
get spec tests running against Puppet::Util -> Util::Execution refactor
|
|
Passing ":squelch => true" to Puppet::Util.execute used to have the side-effect of setting :failonfail to "false"; you must pass :failonfail explicitly now if you want it to override the default behavior of :failonfail => true.
|
|
Puppet::Util.execute_posix contained some code that would override some locale-related environment variables in order to force the command being executed to produce well-known, consistent, predictably formatted output so that it could be parsed. However, there are some cases (such as a user-defined "exec" block) where we need to respect the system/user locale settings. Add a boolean parameter to the Puppet::Util.execute method that allows toggling this locale override behavior.
The "exec" provider now passes "false" for this value, meaning that we no longer override the locale for user-defined "exec" resources. Users may choose to override the locale themselves by specifying the appropriate locale-related vars in the "environment" section of their resource.
All of this is ignored on windows at the moment, but the parameter is passed in to "execute", which is responsible for calling "execute_windows" on windows systems. We could decide to do something with this parameter on windows at some point in the future.
|
|
|
|
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
|
|
* 2.7.x: (21 commits)
(#7296) Make the Debian service provider handle services that don't conform to the debain policy manual.
(#4836) - Agent --disable should allow to put a message
(#3757) - Refactor enable/disable to its own module
(#3757) - Move enable/disable to its own lock
Fix failing tests with ruby 1.9.2 in the instrumentation framework
Use all lower-case file name for Puppet::Util::Instrumentation::Instrumentable
Maint: Fix typo in usage example for create_resources function
Set of faces to manage instrumentation listeners, data and probes
Example probes for the indirector
Add probe indirection for probe management
Process name instrumentation listener
Add the 'performance' instrumentation listener
Add the example 'log' listener
Add a way to add probe to puppet code
Add indirection (REST usable) to manipulate instrumentation
Instrumentation foundation layer
(#8119) Write reports to a temporary file and move them into place
(#11414) Test Augeas versions correctly with versioncmp
(#11414) Save/execute changes on versions of Augeas < 0.3.6
Updated CHANGELOG for 2.6.13
...
Conflicts:
spec/unit/application/agent_spec.rb
spec/unit/provider/augeas/augeas_spec.rb
|
|
The XMLRPC code was left in place to ensure backward compatibility with
Puppet 0.24.x clients, but 0.24.x clients haven't been able to talk to
masters since 0.25.6 due to other bugs and incompatibilities.
Therefore, the XMLRPC code has been dead code for a long time and
removing it makes the codebase a lot easier to navigate.
Paired with Patrick Carlisle <patrick@puppetlabs.com>
|
|
TransObject and TransBucket were no longer used except as an intermediate form
when converting between Puppet::Resource and Puppet::Type::Resource. This
removes TransBucket and TransObject entirely and rewrites the conversion
(to_resource) so the intermediate to_trans call is unneeded. There was custom
logic in Puppet::Type::File#to_trans that was moved to a to_resource method.
Backward compatibility with 0.24.x has been broken for some time (0.25.5 is
the last release I've seen that works running a master with 0.24.x agents),
but we removed Network::Handler::Master which depended on TransObject. This is
the beginning of removing XMLRPC code (ticket #8296), which is what in theory
provided the 0.24.x backward compatibility.
Paired with Patrick Carlisle <patrick@puppetlabs.com>
|
|
This change also contains a refactor split of Pidlock into its
anonymous counterpart.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
* 2.7.x:
(#10739) Provide default subjectAltNames while bootstrapping master
Give variables more descriptive names
maint: Rename xgenerate to add_dynamically_generated_resources
(#6907) Prefetch unsuitable providers
(#6907) Allow providers to be selected in the run they become suitable
maint: Fix incorrect whitespace
Fix description in service provider test for FreeBSD
(#6697) Set service provider default path to /etc/rc.d on Archlinux
(#6335) Allow optional trailing comma in argument lists.
(#8255) Always use string modes when creating resources from FileSetting settings
(#7274) Output 4-digit file modes in File type
(#10799) Regexp escaping too much
|
|
Now we don't need comments everywhere it's used and defined to explain
what it does.
|
|
Previously, if we chose to use an unsuitable provider, we would not
prefetch it because it wasn't suitable at the beginning of the run. Now,
we lazily prefetch, waiting until the first resource of a particular provider is evaluated.
If the provider we are prefetching is also the default provider for its type,
we also find resources of that type with no specified provider, and assign them
the default provider. This allows us to avoid prefetching the same provider
twice (once for resources explicitly using it, and once for resources
implicitly using it because it's the default).
|
|
* ticket/master/3669-make-puppet-honor-DNS-SRV-records:
(#3669) Find servers via DNS SRV records
Reset saved indirection state to an empty hash instead of nil after restoring
Realign test/lib/puppettest.rb after the Great Indentation Change
|
|
|
|
We now exit early if #eval_generate does not produce any resources.
This has the impact of not adding a completed_ whit for the resource,
which is not necessary without any children.
We also now return true if #eval_generate created resources, and false
if it did not. This allows callers to reason about whether the graph
actually changed.
|
|
|
|
Now that `dns_alt_names` applies to local CSR generation, there is no need
for a special configuration option only applied to a master certificate.
Eliminating that option allows us to simplify the overall model, and provide
more uniform access to the `subjectAltName` setting when required.
Documentation about the option is also updated.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
In order to remove the legacy SSLCertificates code, we first need to
rework the one place it's still being used, which is the CA handler.
Now, this handler essentially just defers to the Puppet::SSL classes.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
We no longer use the xmlrpc client in 2.6, so this is dead code. Because
it depends on the legacy SSLCertificates code, which is also going away,
this code needs to be removed. We leave the server code for backward
compatibility with older clients.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
As part of the update to SSL the behaviour of the `certdnsnames` options
changed sufficiently that it would be terribly confusing to retain it.
Instead, modify the setting to warn that it is ignored, and add a new setting
to set the default subjectAltName value for bootstrapping a master
certificate.
This retains the one really useful part of the feature, without the risk that
someone will accidentally use the old name and receive a nasty surprise.
It should also draw more attention to formerly insecure configurations.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|
The change from four to two space indents left some code blocks
mis-aligned. This addresses those mis-alignments found in
test/lib/puppettest.rb.
|