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

Improve spec tests around pe puppet version

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 3.7.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1

      Description

      Several spec tests started to fail when run in CI because of poor isolation with the host environment.

      Failures:
       
        1) Puppet#version should be valid semver
           Failure/Error: SemVer.should be_valid Puppet.version
             expected valid?("3.6.2 (Puppet Enterprise 3.3.0)") to return true, got nil
           # ./spec/unit/puppet_spec.rb:12:in `block (3 levels) in <top (required)>'
       
        2) Puppet::Util::CommandLine#execute should print the version and exit if --version is given
           Failure/Error: expect do
             expected /^3.6.2 (Puppet Enterprise 3.3.0)$/ to be printed; got:
             3.6.2 (Puppet Enterprise 3.3.0)
           # ./spec/unit/util/command_line_spec.rb:71:in `block (4 levels) in <top (required)>'
       
        3) Puppet::Util::CommandLine#execute should print the version and exit if -V is given
           Failure/Error: expect do
             expected /^3.6.2 (Puppet Enterprise 3.3.0)$/ to be printed; got:
             3.6.2 (Puppet Enterprise 3.3.0)
           # ./spec/unit/util/command_line_spec.rb:71:in `block (4 levels) in <top (required)>'
       
        4) Puppet::Util::CommandLine when dealing with puppet commands when the subcommand is not implemented and an external implementation cannot be found should abort and display --version information
           Failure/Error: expect {
             expected /^3.6.2 (Puppet Enterprise 3.3.0)$/ to be printed; got:
             Error: Unknown Puppet subcommand 'whatever'
             3.6.2 (Puppet Enterprise 3.3.0)
           # ./spec/unit/util/command_line_spec.rb:126:in `block (6 levels) in <top (required)>'
       
        5) Puppet::Util::CommandLine when dealing with puppet commands when the subcommand is not implemented and an external implementation cannot be found should abort and display -V information
           Failure/Error: expect {
             expected /^3.6.2 (Puppet Enterprise 3.3.0)$/ to be printed; got:
             Error: Unknown Puppet subcommand 'whatever'
             3.6.2 (Puppet Enterprise 3.3.0)
           # ./spec/unit/util/command_line_spec.rb:126:in `block (6 levels) in <top (required)>'
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  anderson Anderson Mills
                  QA Contact:
                  Kurt Wall
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: