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

beaker instructions at ./acceptance/readme seem to be wrong

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.10.10
    • Component/s: None
    • Labels:
      None
    • Template:
      PUP Bug Template
    • Sub-team:
    • Team:
      Platform Core
    • Sprint:
      Platform Core KANBAN
    • Method Found:
      Needs Assessment
    • Release Notes:
      Not Needed
    • QA Risk Assessment:
      No Action

      Description

      Instructions for running beaker locally in the file acceptance/README.md seem to be broken in master.

      I've been running using:

      CONFIG=config/nodes/centos6-local.yaml SHA=#{test-commit-sha} GIT_SERVER='192.168.80.1' FORK='puppet' bundle exec rake --trace ci:test:git
      

      As suggested by the instructions, I encountered 2x failures:

      Errored build: Unable to yum install rubygem-json
      Fix was to use a centos7 vagrant box which already has "Development Tools" metapackage installed

      Errored build: Unable to checkout puppet from git

      ...SNIP
          Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
          installing your bundle as root will break this application for all non-root
          users on this machine.
          Fetching https://github.com/puppet/puppet.git
          fatal: Needed a single revision
          Revision 15ffe6b31 does not exist in the repository
          https://github.com/puppet/puppet.git. Maybe you misspelled it?
        
        all-in-one executed in 226.35 seconds
        Exited: 11
        Beaker::Host::CommandFailure: Host 'all-in-one' exited with 11 running:
      ...SNIP
      

      This turns out to be the build system not using the GIT_SERVER environment variable. I had a quick scan through the code and couldn't see it being used anywhere. I came up with a hacky workaround by editing acceptance/setup/git/pre-suite/010_TestSetup.rb around line 35 to just hardcode to the git server I setup (git daemon, as per instructions):

              gemfile_contents = <<END
      source '#{ENV["GEM_SOURCE"] || "https://rubygems.org"}'
      gem '#{repository[:name]}', :git => 'git://192.168.0.1/puppetlabs-puppet.git', :ref => '#{ENV['SHA']}'
      # gem '#{repository[:name]}', :git => '#{repository[:path]}', :ref => '#{ENV['SHA']}'
      END
      

      After making these two changes, it looks like the beaker tests are mostly working, but it would be great to get the instructions updated/helpers fixed to make life easier for those contributing patches

        Attachments

          Activity

            People

            Assignee:
            eric.sorenson Eric Sorenson
            Reporter:
            williams.geoff Geoff Williams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support