Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update alias spec error message expectation for PUP-6694 #766

Closed

Conversation

@domcleal
Copy link
Member

commented May 2, 2017

The alias data type name is now included in the error message for data
type mismatches, since puppetlabs/puppet@aef2661. This fixes the
following class of failures against Puppet's master branch:

1) test::float rejects other values true should fail to compile and raise an error matching /parameter 'value' expects a value of type Float or Pattern(\[.*\]+)?/
   Failure/Error: it { is_expected.to compile.and_raise_error(/parameter 'value' expects a value
     of type Float or Pattern(\[.*\]+)?/) } error during compilation: Evaluation Error: Error while evaluating a Resource Statement,
     Class[Test::Float]: parameter 'value' expects a Stdlib::Compat::Float = Variant[Float, Pattern[/^-?(?:(?:[1-9]\d*)|0)(?:\.\d+)(?:[eE]-?\d+)?$/]] value, got Boolean at line 1:1 on node [..]
   # ./spec/aliases/float_spec.rb:23:in `block (5 levels) in <top (required)>'
Update alias spec error message expectation for PUP-6694
The alias data type name is now included in the error message for data
type mismatches, since puppetlabs/puppet@aef2661. This fixes the
following class of failures against Puppet's master branch:

    1) test::float rejects other values true should fail to compile and raise an error matching /parameter 'value' expects a value of type Float or Pattern(\[.*\]+)?/
       Failure/Error: it { is_expected.to compile.and_raise_error(/parameter 'value' expects a value
         of type Float or Pattern(\[.*\]+)?/) } error during compilation: Evaluation Error: Error while evaluating a Resource Statement,
         Class[Test::Float]: parameter 'value' expects a Stdlib::Compat::Float = Variant[Float, Pattern[/^-?(?:(?:[1-9]\d*)|0)(?:\.\d+)(?:[eE]-?\d+)?$/]] value, got Boolean at line 1:1 on node [..]
       # ./spec/aliases/float_spec.rb:23:in `block (5 levels) in <top (required)>'
@domcleal

This comment has been minimized.

Copy link
Member Author

commented Jul 19, 2017

715c40d and 33922a4 were merged instead.

@domcleal domcleal closed this Jul 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.