| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
There is no good answer to tests that depend on the order of itteration over hashes.
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit addresses the original issue that the change reverted in the previous
commit for #5755 was intended to fix by removing the special case on labels in
emit (lables, even if they are never generated, are not "new lines" and thus
@recent_nl should always be set to false when one is emitted).
It also partially addresses a related issue wherein temporary strings generated
when field names are constructed recycle their object_id (they are temporary)
and thus cause incorrect back references. This commit "fixes" the problem by
never generating backrefs to strings (treating them as immutable).
It does not address other suspected issues such as thread safety durring serialization
due to the use of class variables to store the seen-object hash or the use of object
ids as "permanently unique" identifiers.
Paired with: Daniel Pittman
Advice & Commiseration: Jesse Wolfe
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* feature/master/5061:
(#5061) - allow special hostclass/define variables to be evaluated as defaults.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
I have always been annoyed that special variables for defines and hostclasses can not be evaluated as param defaults. Special variables are: $name, $title, $module_name.
Code example:
class x (
foo = $name
) { notice($foo)}
should print x, and with my patch, it does.
Reviewed-by: Paul Berry <paul@puppetlabs.com>
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* ticket/2.6.next/5045:
(#5045) Cleaning up some tests and code
(#5045) External node classifiers should be able to specify params for classes
(#5045) Adds support to resource/type to also accept a param hash
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Renamed some variables to be clearer, made tests use less stubbing,
added some additional tests and got rid of some unecessary logic.
Paired-with: Dan Bode
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It facilitates the support for param classes from the ENC. It adds
support for classes to be passed as a hash to the evaluate_classes
method. If a hash of classes is specified, it also evaluates duplicates.
I also had to convert the hash to an array for tags to be applied
correctly.
Reviewed-by: Matt Robinson
|
| | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The params are added as attributes when the resource is created.
Also, even if the class already exists, if params are passed, we still try to create it.
Reviewed-by: Matt Robinson
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* ticket/2.6.next/6107:
(#6107) Fix an error when auditing a file with empty content
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The manifest:
file { "/tmp/foo" :
ensure => present,
audit => content,
}
produced the error:
err: /Stage[main]//File[/tmp/foo]/ensure: change from absent to present
failed: Could not retrieve content for from filebucket: private method `sub' called for nil:NilClass at
/Users/matthewrobinson/work/puppet/test.pp:4
This was due to logic in content assuming that if you didn't specify
content while you were auditing it you must have specified a source.
The code paths in the file type badly need a cleanup so that these sorts
of errors aren't so difficult to track down and things are easier to
test.
Paired-with: Daniel Pittman
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
rspec pulls constants from the implementation into the test, so we don't
need to redefine it.
Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Certain checksum types (ctime, mtime) only make sense when used with the
'source' File parameter, since there is no way to check them on raw
strings.
Given the limitations of the current checksumming implementations, it is
likely to introduce unexpected behavior when using the 'none' checksum
type and either one of the 'source', and 'content' File parameters.
Because of this, it is now a syntax error to use a checksum of 'none' with
either parameter.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If source was specified after setting the checksum, it would cause the
checksum to be set back to :md5. This was completely unnecessary, because
the checksum has its own default of :md5.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This data structure generates YAML with an extra newline that violates the
syntax rules and all:
list = [1]
{ :a => list, :b => list }.to_yaml
This breaks real client use of the YAML catalogs, not to mention our own use
of cached catalogs...
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This also adds a fixture file containing the AIX mount output as submitted by the
ticket author.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
They presently are not; this ensures that we verify that before merging a
change that fixes bugs in the area.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Setting the age value to -1 will disable the specific aging value; we should
accept that, but continue to reject null or empty values as invalid.
Add tests to verify that this code enforces as expected.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The FreeBSD package provider fails to install when any source is given,
yielding instead an 'undefined method' error. This adds tests that prove the
bug exists.
|
|\ \ \ \ \ |
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The Directory Service group (and user) provider behaves erratically if members
is a nested list; this happens with the following manifest:
$r = ["root"]
$a = ["daemon", "crc"]
$n = ["nobody"]
group { "testgroup":
ensure => present,
members => [$r, $a, $n]
}
This resolves the issue by flattening the list at the time we are using it;
while a more general solution might be desirable this resolves the specific
issue cleanly enough.
Original patch from Clay Caviness.
Tests by Daniel Pittman <daniel@puppetlabs.com>
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Signed-off-by: James Turnbull <james@lovedthanlost.net>
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Created a method safe_insync? which first checks whether the property
has a "should" value of nil, and if so returns true. Most insync?
methods were already doing this, but a few were not, leading to bugs
if a property was being audited but not set.
Types should continue to override the insync? method, but callers of
insync? should call safe_insync? instead.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | |
| | | |
| | | |
| | | | |
Paired-With: Paul Berry
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If auditing a resource fails, the report will contain failure events for every
audited property of the resource. The report itself will also be marked as
"failed".
Paired-With: Paul Berry
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This only occurs if the new setting :archive_files is set. Another
new setting, :archive_file_server, can be used to specify the server
that files should be uploaded to.
Paired-with: Nick Lewis <nick@puppetlabs.com>
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* ticket/2.6.next/5838:
(#5838) Support paths as part of file bucket requests.
(#5838) Improve the quality of file bucket specs.
(#5838) Make file bucket dipper efficient when saving a file that already exists
(#5838) Implemented the "head" method for FileBucketFile::File terminus.
(#5838) Reworked file dipper spec to perform less stubbing.
(#5838) Added support for HEAD requests to the indirector.
(#5838) Refactored error handling logic into find_in_cache.
(#5838) Refactored Puppet::Network::Rights#fail_on_deny
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In versions of Puppet 2.6.0-2.6.4, file bucket requests are of the
form md5/<checksum>/<path>. The path functionality has been removed,
however we still need to support requests coming from older clients.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | | |
| | | | |
| | | | |
| | | | | |
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Before saving to the file bucket, the file bucket dipper now checks to
make sure that no file with the given checksum is already present.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In order to do this it was necessary to refactor FileBucketFile to
untangle responsibilities for computing paths, reading files, etc. In
the process, removed speculative generalizations and unused
functionality.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is in preparation for adding more functionality to the file
dipper.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Added the ability for the indirector to handle REST HEAD requests.
These are done using a new indirector method, head(), which should
return true if find() would return a result and false if find() would
return nil.
Access control for the head method is the union of that for the find
and save methods. That is, if either find or save is allowed, then
head is allowed. This is necessary so that users will not have to
change their authconfig to take advantage of the new feature.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Changed into a method that returns the exception to raised rather than
raising it.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The Rakefile just created rake tasks so that you could run all the specs
in a subdirectory. However, rspec already allows you to just give the
subdirectory as an argument and does the same thing, so these rake tasks
were unecessary.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It is now possible to ask the filebucket to diff two files using a URL
of the form:
https://puppet/production/file_bucket_file/md5/{first file hash}?diff_with={second file hash}
The returned diff is a string, the output of the "diff" command.
Paired-with: Paul Berry <paul@puppetlabs.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In the resource harness, we were calling insync? on all properties of
a resource, even if those properties weren't being managed. This was
unsafe. Changed to only call insync? on properties that are mentioned
in the manifest.
In addition, we discovered that the resource harness's computation of
desired_values was incorrect, and was consulting the current system
state rather than the desired state. Since this hash was
(erroneously) only being consulted to see if it included :ensure, this
didn't cause any obvious bugs. However it is now fixed.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Moved the stub provider to its own method so that it can be re-used in
additional spec tests.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Added a resource harness test to verify that the correct events are
generated if there is a failure while synchronizing a resource.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
|\| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This report processor was unnecessarily using Puppet to create a
single directory. This was causing complex failures in any spec
dealing with reports.
Paired-With: Paul Berry
|
|/ / /
| | |
| | |
| | | |
Paired-with: Jesse Wolfe
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Due to changes in the spec_helper, some of the specs that use puppettest were
failing when run individually. In the future, it would be nice to remove
puppettest from the specs entirely, as it's old, crufty, and only used for a
couple of things.
Paired-With: Matt Robinson
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The biggest change is that we no longer need to monkey patch rspec to
get confine behavior. Describe blocks can now be conditional like
confine used to be. "describe" blocks with "shared => true" are now
"shared_examples_for".
Paired-With: Nick Lewis
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* ticket/2.6.next/5758:
(#5758) Verify that report events are correctly created
Prep work for #5758: set audited=true on all audit events
Prep work for #5758: clean up initializer for Puppet::Transaction::Event
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Added code to resource_harness_spec to test all the attributes of
report events, not just the log messages.
Paired-with: Matt Robinson <matt@puppetlabs.com>
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If a resource is absent, then reporting that its properties are all
":absent" is not particularly correct. This patch makes the `inspect`
application's reports behave more like `apply` reports, and skip
properties other than :ensure for absent resources.
Reviewed-By: Nick Lewis <nick@puppetlabs.com>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
These new attributes save report processors from having to parse the
"resource" attribute.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Puppet::Resource::Status.
This attribute is only used for properly generating log messages and
was never intended to appear in reports.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The removed attributes are file, line, resource, tags,
source_description, and default_log_level. These attributes were all
redundant with those in Puppet::Resource::Status.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The attributes Puppet::Resource::Status#changed,
Puppet::Resource::Status#out_of_sync, and
Puppet::Transaction::Event#audited used to only appear in reports when
their state was true. Now they appear always.
|