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

Spec failures on Arch Linux if yaourt is installed

    Details

    • Type: Task
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.5.0
    • Fix Version/s: PUP 3.5.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      ArchLinux

    • Template:
    • Story Points:
      1
    • Sprint:
      Week 2014-1-22 to 2014-1-29

      Description

      If yaourt is installed on Arch Linux, the pacman package provider will execute it instead of pacman. This results in failures for two specs that assume pacman will be run:

      1) Puppet::Type::Package::ProviderPacman when installing should call pacman to install the right package quietly
           Failure/Error: @provider.install
           Mocha::ExpectationError:
             unexpected invocation: Puppet::Util.which('/usr/bin/yaourt')
             unsatisfied expectations:
             - expected at least once, not yet invoked: Puppet::Util::Execution.execute(['/usr/bin/pacman', '--noconfirm', '--noprogressbar', '-Sy', 'package'], {:failonfail => true, :combine => true, :custom_environment => {}})
             satisfied expectations:
             - allowed any number of times, not yet invoked: Signal.trap(any_parameters)
             - allowed any number of times, not yet invoked: Puppet::Util.which('/usr/bin/pacman')
             - allowed any number of times, not yet invoked: Puppet::Type::Package::ProviderPacman.which('/usr/bin/pacman')
             - allowed any number of times, not yet invoked: #<Puppet::Type::Package::ProviderPacman:0x185149e8>.query(any_parameters)
           # ./lib/puppet/provider/command.rb:22:in `execute'
           # ./lib/puppet/provider.rb:237:in `block in has_command'
           # ./lib/puppet/provider.rb:444:in `block in create_class_and_instance_method'
           # ./lib/puppet/provider/package/pacman.rb:37:in `install_from_repo'
           # ./lib/puppet/provider/package/pacman.rb:27:in `install'
           # ./spec/unit/provider/package/pacman_spec.rb:33:in `block (3 levels) in <top (required)>
       
      2) Puppet::Type::Package::ProviderPacman when installing should raise an ExecutionFailure if the installation failed
           Failure/Error: lambda { @provider.install }.should raise_exception(Puppet::ExecutionFailure)
             expected Puppet::ExecutionFailure, got #<Mocha::ExpectationError: unexpected invocation: Puppet::Util.which('/usr/bin/yaourt')
             unsatisfied expectations:
             - expected exactly once, not yet invoked: #<Puppet::Type::Package::ProviderPacman:0x1855aab0>.query(any_parameters)
             satisfied expectations:
             - allowed any number of times, not yet invoked: Signal.trap(any_parameters)
             - allowed any number of times, not yet invoked: Puppet::Util.which('/usr/bin/pacman')
             - allowed any number of times, not yet invoked: Puppet::Type::Package::ProviderPacman.which('/usr/bin/pacman')
             - allowed any number of times, not yet invoked: #<Puppet::Type::Package::ProviderPacman:0x1855aab0>.query(any_parameters)
             - allowed any number of times, not yet invoked: Puppet::Util::Execution.execute(any_parameters)
             >
           # ./spec/unit/provider/package/pacman_spec.rb:40:in `block (3 levels) in <top (required)>'
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              peter.huene Peter Huene
              QA Contact:
              Kurt Wall
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support