Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6319

Bad message when passing zero sized hash where non empty hash is required

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.5.0
    • Fix Version/s: PUP 4.5.1
    • Component/s: None
    • Labels:
    • Template:
    • Acceptance Criteria:
      Hide

      puppet apply -e 'assert_type(Hash[String,String,1,default], {})'
      

      should output the message "expected size to be at least 1, got 0"

      Show
      puppet apply -e 'assert_type(Hash[String,String,1,default], {})' should output the message "expected size to be at least 1, got 0"
    • Story Points:
      1
    • Sprint:
      Language 2016-05-18, Language 2016-06-01
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      A bad type mismatch message was produced when size constraint on hash was not met. It now clearly points out that it was the size of the hash that caused the failure.

      Description

      Passing an empty hash where a non-empty hash is required currently reports an element type mismatch such as:

      expected a Hash[String, String] value, got Hash[0, 0]
      

      This is wrong. It should report the size mismatch.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              thomas.hallgren Thomas Hallgren
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support