Age | Commit message (Collapse) | Author |
|
* 2.1.x:
(Maint) Fix mis-use of rvalue functions as statements
Add .rspec file to repo root
Conflicts:
spec/unit/puppet/parser/functions/getvar_spec.rb
spec/unit/puppet/parser/functions/has_key_spec.rb
spec/unit/puppet/parser/functions/merge_spec.rb
|
|
* fix/2.1.x/spec_failures:
(Maint) Fix mis-use of rvalue functions as statements
Add .rspec file to repo root
|
|
Without this patch applied the spec tests are invalid because they call
rvalue functions as if they were statements. This is a problem because
Puppet 2.7.x currently throws an exception if a rvalue function is
invoked as if it were a statement function. This exception from Puppet
is causing tests to fail.
This patch fixes the problem by changing the tests to assign the return
value of the functions to a variable. This fixes the problem by
invoking the functions properly.
Paired-with: Andrew Parker <andy@puppetlabs.com>
|
|
Without this patch we don't get an opinionated rspec behavior. This
patch makes the behavior of `rake test` and `rspec spec/` opinionated
by including some default options.
|
|
In Puppet 2.6.x there is a bug where a function may be incorrectly detected as
an rvalue when it is not, or not detected when it is. This means that in tests
the correct syntax for calling a function will be rejected. This disables
those tests on 2.6.x, as there is no straightforward way to write them to be
compatible with both 2.6.x and newer versions of Puppet.
|
|
A bug fix in Puppet exposed that several tests were using rvalue functions
incorrectly (this was not properly checked by puppet before). This fixes those
tests.
|
|
(Maint) Rename PuppetlabsSpec::Puppet{Seams,Internals}
|
|
The module PuppetlabsSpec::PuppetSeams has been renamed in the
puppetlabs_spec_helper gem to PuppetlabsSpec::PuppetInternals.
The method to obtain a scope object has also changed slightly. Without
this patch the spec tests will fail because the stdlib module is not
aligned with the spec helper gem. This patch fixes the problem by
matching up messages with their receivers in the spec helper library.
Paired-with: Andrew Parker <andy@puppetlabs.com>
|
|
* fix/2.2.x/make_it_green:
(Maint) use PuppetlabsSpec::PuppetSeams.parser_scope
(Maint) Fix interpreter lines
|
|
Without this patch all of the spec tests for parser functions in stdlib
would instantiate their own scope instances. This is a problem because
the standard library is tightly coupled with the internal behavior of
Puppet. Tight coupling like this creates failures when we change the
internal behavior of Puppet. This is exactly what happened recently
when we changed the method signature for the initializer of
Puppet::Parser::Scope instances.
This patch fixes the problem by creating scope instances using the
puppet labs spec helper. The specific method that provides scope
instances in Puppet-version-independent way is something like this:
let(:scope) { PuppetlabsSpec::PuppetSeams.parser_scope }
This patch simply implements this across the board.
|
|
This time around I actually know why I'm doing this thanks to the
reminder from Nick Lewis.
Ruby will replace itself in memory with the executable listed in the
interpreter line if the string "ruby" is not in there.
Since /usr/bin/env rspec doesn't contain the substring "ruby", you can't
actually run ruby -W1 or whatever on the file.
This patch fixes the problem by making sure "ruby" is present,
preventing ruby from replacing itself in memory.
|
|
This patch back ports the file from the master branch. The spec tests
fail without this patch applied. This should make it easier to setup
Puppet settings using the puppet_spec_helper project.
|
|
'eshamow/tickets/bug/13595_restrict_initialize_everything_for_tests' into 2.2.x"
This reverts commit 40da421c0480f940638d0db9aabf180500d6ae5c, reversing
changes made to 69465b0f3e0c0c5284812bfa76ab8d3c254d10a9.
|
|
'eshamow/tickets/bug/13595_restrict_initialize_everything_for_tests' into 2.2.x
* eshamow/tickets/bug/13595_restrict_initialize_everything_for_tests:
(#13595) initialize_everything_for_tests couples modules Puppet ver
|
|
Replace regex used in spec_helper.rb to disallow both Puppet 2.6 and any
2.7 prior to 13.
|
|
* ticket/2.2.x/13439_fix_spec_helper_try3:
(#13439) Fix MRI 1.9 issue with spec_helper
|
|
When using MRI 1.9.x the stdlib spec helper does not invoke because
Puppet.settings.private_methods returns symbols instead of strings.
This is a problem because we need to set default configuration settings
like Puppet[:vardir] when using the compiler.
This patch fixes the issue by simply checking the Puppet version. This
seems a better choice than rescuing NoMethodError since the method might
be renamed or removed in the future.
|
|
* ticket/2.2.x/13439_fix_spec_helper_try2:
(#13439) Fix test failures with Puppet 2.6.x
|
|
Without this patch the spec_helper sends a message named
initialize_everything_for_tests to Puppet.settings. This is a problem
because Puppet 2.6.x does not have this method, only Puppet 2.7.x and
Puppet master have this method at this time and we're getting false
positive test failures.
This patch fixes the problem by looking before we leap. We test if the
private method exists before calling it. This works with Ruby 1.8.5 and
onwards and Puppet 2.6, 2.7 and master.
This should fix all of the failures I've caused in Jenkins today.
|
|
* ticket/2.2.x/13439_fix_spec_helper:
(#13439) refactor spec helper for compatibility with both puppet 2.7 and master
|
|
master
|
|
* 2.1.x:
Update CHANGELOG, Modulefile for 2.1.3
Conflicts:
CHANGELOG
Modulefile
|
|
* maint/2.2.x/range_spec_tests:
(#13494) Specify the behavior of zero padded strings
|
|
Without this patch the specified behavior of strings that are numeric
only and zero padded is unclear and untested in the spec tests. This is
a problem because it's not clear that range('00', '10') will actually
return [ "0", "1", ..., "10" ] instead of [ "00", "01", ..., "10" ]
This patch addresses the issue by providing explicit test coverage. If
the string conversion behavior of puppet changes, this test will begin
to fail.
|
|
|
|
* 2.1.x:
(#12377) Avoid infinite loop when retrying require json
|
|
'ticket/2.2.x/12377_stdlib_facter_dot_d_loaderror_recovery_may_be_harmful' into 2.1.x
* ticket/2.2.x/12377_stdlib_facter_dot_d_loaderror_recovery_may_be_harmful:
(#12377) Avoid infinite loop when retrying require json
|
|
Without this patch an infinite loop will be entered if the json and
rubygems libraries are not available.
This patch fixes the problem by retrying the `require 'json'` only if
rubygems was successfully loaded for the first time. Subsequent
attempts to load rubygems will cause the LoadError exception from a
missing json library to be re-raised.
Thanks to Krzysztof Wilczynski for pointing out this issue.
|
|
* bug/2.2.x/is_domain_name:
Check according to rfc1035
Add additional domain name tests
(maint) Memoize scope in domain_name spec
Closes pull request GH-24
|
|
Update doc string to match function
|
|
Without this patch some valid domain names are not covered in the spec
tests as Stig Sandbeck Mathisen <ssm@debian.org> points out. This patch
adds spec tests for the domains "." and "x.com" which are both valid.
|
|
This is an opportunity improvement since I'm in the code. Get rid of
instance variables in the spec test and replace them with a memo let
method block.
|
|
* ticket/2.2.x/11901-rspec_sort_order:
(#11901) Fix sort order error in tests for 'keys' and 'values'
|
|
Between Ruby 1.8.7 p352 and p357 the way arrays were returned when using
keys and values in Ruby changed, and due to assumption about the
ordering our tests are now failing.
This patch fixes the issue by using the =~ operator matcher in rspec.
This matcher is implemented as RSpec::Matchers::MatchArray and performs
multiset equality matching of arrays. Order doesn't matter, but
duplicate values do.
This patch also switches @scope instance variables to memoized let
methods for clarity in the code.
Original Author: Ken Barber
Reviewed-by: Nick Lewis
This commit closes GH-29
|
|
(#11873) time function spec failure on Fixnum matcher
|
|
The rspec code for the time function was trying to match the type to be a
'Fixnum'. Ruby will sometimes make this a 'Bignum' depending on its internals
and we can't rely on this to be true all the time.
This patch just makes sure the type is an integer instead.
|
|
* 2.1.x:
(#11607) Add Rakefile to enable spec testing
|
|
jeffmccune/ticket/2.1.x/11607_fix_ci_tests_for_stdlib
(#11607) Add Rakefile to enable spec testing
|
|
Without this patch the 2.1.x branch does not have a Rakefile like the
2.2.x and master branches do. This is a problem for the continuous
integration testing since it executes `rake test` against 2.1.x, 2.2.x
and master currently.
This patch fixes the problem by copying the Rakefile into place enabling
the `rake test` task.
Reviewed-by: Josh Cooper
|
|
|
|
* 2.1.x:
Update Modulefile CHANGELOG for v2.1.2 release
Conflicts:
CHANGELOG
Modulefile
|
|
|
|
* v2.1.x:
(maint) Add semantic versioning info to README
Docs: Clarify the use case for the anchor type
Docs: Remove author emails from stdlib functions
Docs: Copyedit function doc strings
Docs: Correct indentation of markdown code examples
Docs: Update documentation of stdlib classes
Docs: Update file_line documentation
Docs: Improve example in merge function
|
|
This patch adds semantic versioning information to the README of this
module. This information is missing and unclear without this patch.
This should help clarify the support matrix for the Standard Library as
it relates to Puppet Enterprise released versions.
|
|
* v2.x:
|
|
Update CHANGELOG and Modulefile for v2.2.0
|
|
(#10285) Refactor json to use pson instead.
|
|
Remove json requirement since puppet already provides pson which is
equivalent.
|
|
* main/mater/watchr:
(Maint) Add watchr autotest script
|
|
This patch adds a watchr script to autotest the stdlib module. To use:
% watchr spec/watchr.rb
|