simp-beaker-helpers 1.18.5 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/.fixtures.yml +2 -4
 - data/.gitlab-ci.yml +15 -47
 - data/CHANGELOG.md +24 -0
 - data/Gemfile +28 -1
 - data/files/pki/template_ca.cnf +1 -1
 - data/files/pki/template_host.cnf +1 -1
 - data/lib/simp/beaker_helpers.rb +90 -60
 - data/lib/simp/beaker_helpers/snapshot.rb +3 -5
 - data/lib/simp/beaker_helpers/version.rb +1 -1
 - data/spec/acceptance/nodesets/default.yml +8 -1
 - data/spec/acceptance/suites/default/install_simp_deps_repo_spec.rb +14 -20
 - data/spec/acceptance/suites/fips_from_fixtures/00_default_spec.rb +3 -0
 - data/spec/acceptance/suites/puppet_collections/00_default_spec.rb +11 -13
 - data/spec/acceptance/suites/snapshot/00_snapshot_test_spec.rb +1 -1
 - data/spec/acceptance/suites/windows/nodesets/default.yml +3 -1
 - metadata +4 -34
 - data/spec/acceptance/suites/puppet_collections/nodesets/default.yml +0 -30
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 658d1ab2cfb6ff32a020283a3a754fd3d8d4eb50cc73b73286422ea5178d48d3
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: b6a7d451700d8ac207905a20014c405f2aa06731f281720dec6a49cae5d34d33
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 13d63f19f099f8ca503d447cf41d150c3d74710c9ceca8a1b7c8dad655d783bd534cc117dc326235b6eb4e7ef6306b1ba6864df0c8add83eaad1737d48cdbf38
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: fe95f26b05dfaeff5be470af3c79d3cb3d7a5fc82ac7dde590f5770647d8b058774cfbc8691a00c3323c4ad85608cac7085b0764f4293e68daec6a6889669af4
         
     | 
    
        data/.fixtures.yml
    CHANGED
    
    | 
         @@ -1,8 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            fixtures:
         
     | 
| 
       3 
     | 
    
         
            -
              # Needed for Hiera v5 to work
         
     | 
| 
       4 
     | 
    
         
            -
              forge_modules:
         
     | 
| 
       5 
     | 
    
         
            -
                compliance_markup: "simp/compliance_markup"
         
     | 
| 
       6 
3 
     | 
    
         
             
              repositories:
         
     | 
| 
       7 
     | 
    
         
            -
                stdlib:  
     | 
| 
      
 4 
     | 
    
         
            +
                stdlib: https://github.com/simp/puppetlabs-stdlib
         
     | 
| 
      
 5 
     | 
    
         
            +
                compliance_markup: https://github.com/simp/pupmod-simp-compliance_markup
         
     | 
| 
       8 
6 
     | 
    
         | 
    
        data/.gitlab-ci.yml
    CHANGED
    
    | 
         @@ -20,16 +20,6 @@ 
     | 
|
| 
       20 
20 
     | 
    
         
             
                - 'rm -rf pkg/ || :'
         
     | 
| 
       21 
21 
     | 
    
         
             
                - bundle check || rm -f Gemfile.lock && ("${BUNDLER_INSTALL[@]}" --local || "${BUNDLER_INSTALL[@]}")
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
            .validation_checks: &validation_checks
         
     | 
| 
       25 
     | 
    
         
            -
              script:
         
     | 
| 
       26 
     | 
    
         
            -
                - bundle exec rake syntax
         
     | 
| 
       27 
     | 
    
         
            -
                - bundle exec rake check:dot_underscore
         
     | 
| 
       28 
     | 
    
         
            -
                - bundle exec rake check:test_file
         
     | 
| 
       29 
     | 
    
         
            -
                - bundle exec rake lint
         
     | 
| 
       30 
     | 
    
         
            -
                # - bundle exec rake pkg:check_version
         
     | 
| 
       31 
     | 
    
         
            -
                # - bundle exec rake pkg:compare_latest_tag
         
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
23 
     | 
    
         
             
            .spec_tests: &spec_tests
         
     | 
| 
       34 
24 
     | 
    
         
             
              script:
         
     | 
| 
       35 
25 
     | 
    
         
             
                - bundle exec rake spec
         
     | 
| 
         @@ -42,43 +32,8 @@ 
     | 
|
| 
       42 
32 
     | 
    
         
             
                  - $SIMP_FULL_MATRIX
         
     | 
| 
       43 
33 
     | 
    
         | 
| 
       44 
34 
     | 
    
         
             
            stages:
         
     | 
| 
       45 
     | 
    
         
            -
              - validation
         
     | 
| 
       46 
35 
     | 
    
         
             
              - unit
         
     | 
| 
       47 
36 
     | 
    
         
             
              - acceptance
         
     | 
| 
       48 
     | 
    
         
            -
              - deploy
         
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
            # Puppet 4.10 for PE 2017.2 support (EOL:2018-02-21)
         
     | 
| 
       51 
     | 
    
         
            -
            # See: https://puppet.com/misc/puppet-enterprise-lifecycle
         
     | 
| 
       52 
     | 
    
         
            -
            # --------------------------------------
         
     | 
| 
       53 
     | 
    
         
            -
            2_1-validation:
         
     | 
| 
       54 
     | 
    
         
            -
              stage: validation
         
     | 
| 
       55 
     | 
    
         
            -
              tags:
         
     | 
| 
       56 
     | 
    
         
            -
                - docker
         
     | 
| 
       57 
     | 
    
         
            -
              image: ruby:2.1
         
     | 
| 
       58 
     | 
    
         
            -
              <<: *cache_bundler
         
     | 
| 
       59 
     | 
    
         
            -
              <<: *setup_bundler_env
         
     | 
| 
       60 
     | 
    
         
            -
              <<: *validation_checks
         
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
            2_1-unit:
         
     | 
| 
       63 
     | 
    
         
            -
              stage: unit
         
     | 
| 
       64 
     | 
    
         
            -
              tags:
         
     | 
| 
       65 
     | 
    
         
            -
                - docker
         
     | 
| 
       66 
     | 
    
         
            -
              image: ruby:2.1
         
     | 
| 
       67 
     | 
    
         
            -
              <<: *cache_bundler
         
     | 
| 
       68 
     | 
    
         
            -
              <<: *setup_bundler_env
         
     | 
| 
       69 
     | 
    
         
            -
              <<: *spec_tests
         
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
            # Puppet 4.10 for PE 2017.2 support (EOL:2018-02-21)
         
     | 
| 
       72 
     | 
    
         
            -
            # See: https://puppet.com/misc/puppet-enterprise-lifecycle
         
     | 
| 
       73 
     | 
    
         
            -
            # --------------------------------------
         
     | 
| 
       74 
     | 
    
         
            -
            2_4-validation:
         
     | 
| 
       75 
     | 
    
         
            -
              stage: validation
         
     | 
| 
       76 
     | 
    
         
            -
              tags:
         
     | 
| 
       77 
     | 
    
         
            -
                - docker
         
     | 
| 
       78 
     | 
    
         
            -
              image: ruby:2.4
         
     | 
| 
       79 
     | 
    
         
            -
              <<: *cache_bundler
         
     | 
| 
       80 
     | 
    
         
            -
              <<: *setup_bundler_env
         
     | 
| 
       81 
     | 
    
         
            -
              <<: *validation_checks
         
     | 
| 
       82 
37 
     | 
    
         | 
| 
       83 
38 
     | 
    
         
             
            2_4-unit:
         
     | 
| 
       84 
39 
     | 
    
         
             
              stage: unit
         
     | 
| 
         @@ -127,7 +82,7 @@ fips_from_fixtures: 
     | 
|
| 
       127 
82 
     | 
    
         
             
                - bundle exec rake spec_clean
         
     | 
| 
       128 
83 
     | 
    
         
             
                - bundle exec rake beaker:suites[fips_from_fixtures]
         
     | 
| 
       129 
84 
     | 
    
         | 
| 
       130 
     | 
    
         
            -
             
     | 
| 
      
 85 
     | 
    
         
            +
            puppet5_collections:
         
     | 
| 
       131 
86 
     | 
    
         
             
              stage: acceptance
         
     | 
| 
       132 
87 
     | 
    
         
             
              tags:
         
     | 
| 
       133 
88 
     | 
    
         
             
                - beaker
         
     | 
| 
         @@ -135,7 +90,18 @@ puppet_collections: 
     | 
|
| 
       135 
90 
     | 
    
         
             
              <<: *setup_bundler_env
         
     | 
| 
       136 
91 
     | 
    
         
             
              variables:
         
     | 
| 
       137 
92 
     | 
    
         
             
                PUPPET_VERSION: '~> 5.3'
         
     | 
| 
       138 
     | 
    
         
            -
             
     | 
| 
      
 93 
     | 
    
         
            +
              script:
         
     | 
| 
      
 94 
     | 
    
         
            +
                - bundle exec rake spec_clean
         
     | 
| 
      
 95 
     | 
    
         
            +
                - bundle exec rake beaker:suites[puppet_collections]
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
            puppet6_collections:
         
     | 
| 
      
 98 
     | 
    
         
            +
              stage: acceptance
         
     | 
| 
      
 99 
     | 
    
         
            +
              tags:
         
     | 
| 
      
 100 
     | 
    
         
            +
                - beaker
         
     | 
| 
      
 101 
     | 
    
         
            +
              <<: *cache_bundler
         
     | 
| 
      
 102 
     | 
    
         
            +
              <<: *setup_bundler_env
         
     | 
| 
      
 103 
     | 
    
         
            +
              variables:
         
     | 
| 
      
 104 
     | 
    
         
            +
                BEAKER_PUPPET_COLLECTION: 'puppet6'
         
     | 
| 
       139 
105 
     | 
    
         
             
              script:
         
     | 
| 
       140 
106 
     | 
    
         
             
                - bundle exec rake spec_clean
         
     | 
| 
       141 
107 
     | 
    
         
             
                - bundle exec rake beaker:suites[puppet_collections]
         
     | 
| 
         @@ -152,6 +118,8 @@ windows: 
     | 
|
| 
       152 
118 
     | 
    
         | 
| 
       153 
119 
     | 
    
         
             
            snapshot:
         
     | 
| 
       154 
120 
     | 
    
         
             
              stage: acceptance
         
     | 
| 
      
 121 
     | 
    
         
            +
              # This is prone to breakage in the underlying system
         
     | 
| 
      
 122 
     | 
    
         
            +
              allow_failure: true
         
     | 
| 
       155 
123 
     | 
    
         
             
              tags:
         
     | 
| 
       156 
124 
     | 
    
         
             
                - beaker
         
     | 
| 
       157 
125 
     | 
    
         
             
              <<: *cache_bundler
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,3 +1,27 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ### 1.19.0 / 2020-09-30
         
     | 
| 
      
 2 
     | 
    
         
            +
            * Fixed:
         
     | 
| 
      
 3 
     | 
    
         
            +
              * rsync handling has a better check to see if rsync actually works prior to
         
     | 
| 
      
 4 
     | 
    
         
            +
                using it.  The old method had the potential to try and use rsync even if it
         
     | 
| 
      
 5 
     | 
    
         
            +
                no longer worked (FIPS flipped for example).
         
     | 
| 
      
 6 
     | 
    
         
            +
            * Changed:
         
     | 
| 
      
 7 
     | 
    
         
            +
              * Migrated from PackageCloud to the SIMP download server for updates moving
         
     | 
| 
      
 8 
     | 
    
         
            +
                forward.
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            ### 1.18.9 / 2020-08-04
         
     | 
| 
      
 11 
     | 
    
         
            +
            * Change windows 2012r2 VM to work around issues where the old image had
         
     | 
| 
      
 12 
     | 
    
         
            +
              duplicate ports trying to be opened
         
     | 
| 
      
 13 
     | 
    
         
            +
            * Increase test CA bits to 4096
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            ### 1.18.8 / 2020-07-14
         
     | 
| 
      
 16 
     | 
    
         
            +
            * Allow the beaker version to be pinned by environment variable
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            ### 1.18.7 / 2020-07-07
         
     | 
| 
      
 19 
     | 
    
         
            +
            * Fix host reference bug when switching to FIPS mode
         
     | 
| 
      
 20 
     | 
    
         
            +
            * Ensure that net-ssh 6+ can access older FIPS systems
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            ### 1.18.6 / 2020-06-24
         
     | 
| 
      
 23 
     | 
    
         
            +
            * Fix Vagrant snapshot issues
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
       1 
25 
     | 
    
         
             
            ### 1.18.5 / 2020-06-24
         
     | 
| 
       2 
26 
     | 
    
         
             
            * Allow Vagrant to connect to EL8+ hosts in FIPS mode
         
     | 
| 
       3 
27 
     | 
    
         
             
            * Add EL8 support to the SSG scans
         
     | 
    
        data/Gemfile
    CHANGED
    
    | 
         @@ -13,7 +13,34 @@ gem 'bundler' 
     | 
|
| 
       13 
13 
     | 
    
         
             
            gem 'rake'
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
            group :system_tests do
         
     | 
| 
       16 
     | 
    
         
            -
               
     | 
| 
      
 16 
     | 
    
         
            +
              beaker_gem_options = ENV.fetch('BEAKER_GEM_OPTIONS', ['>= 4.17.0', '< 5.0.0'])
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
              if "#{beaker_gem_options}".include?(':')
         
     | 
| 
      
 19 
     | 
    
         
            +
                # Just pass in BEAKER_GEM_OPTIONS as a string that would represent the usual
         
     | 
| 
      
 20 
     | 
    
         
            +
                # hash of options.
         
     | 
| 
      
 21 
     | 
    
         
            +
                #
         
     | 
| 
      
 22 
     | 
    
         
            +
                # Something like: BEAKER_GEM_OPTIONS=':git => "https://my.repo/beaker.git", :tag => "1.2.3"'
         
     | 
| 
      
 23 
     | 
    
         
            +
                #
         
     | 
| 
      
 24 
     | 
    
         
            +
                # No, this isn't robust, but it's not really an 'every day' sort of thing
         
     | 
| 
      
 25 
     | 
    
         
            +
                # and safer than an `eval`
         
     | 
| 
      
 26 
     | 
    
         
            +
                begin
         
     | 
| 
      
 27 
     | 
    
         
            +
                  gem 'beaker', Hash[
         
     | 
| 
      
 28 
     | 
    
         
            +
                    beaker_gem_options.split(',').map do |x| # Split passed options on k/v pairs
         
     | 
| 
      
 29 
     | 
    
         
            +
                      x.gsub('"', '').strip.split(/:\s|\s+=>\s+/) # Allow for either format hash keys
         
     | 
| 
      
 30 
     | 
    
         
            +
                    end.map do |k,v|
         
     | 
| 
      
 31 
     | 
    
         
            +
                      [
         
     | 
| 
      
 32 
     | 
    
         
            +
                        k.delete(':').to_sym, # Convert all keys to symbols
         
     | 
| 
      
 33 
     | 
    
         
            +
                        v.strip
         
     | 
| 
      
 34 
     | 
    
         
            +
                      ]
         
     | 
| 
      
 35 
     | 
    
         
            +
                    end
         
     | 
| 
      
 36 
     | 
    
         
            +
                  ] # Convert the whole thing to a valid Hash
         
     | 
| 
      
 37 
     | 
    
         
            +
                rescue => e
         
     | 
| 
      
 38 
     | 
    
         
            +
                  raise "Invalid BEAKER_GEM_OPTIONS: '#{beaker_gem_options}' => '#{e}'"
         
     | 
| 
      
 39 
     | 
    
         
            +
                end
         
     | 
| 
      
 40 
     | 
    
         
            +
              else
         
     | 
| 
      
 41 
     | 
    
         
            +
                gem 'beaker', beaker_gem_options
         
     | 
| 
      
 42 
     | 
    
         
            +
              end
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
       17 
44 
     | 
    
         
             
              gem 'beaker-rspec'
         
     | 
| 
       18 
45 
     | 
    
         
             
              gem 'beaker-windows'
         
     | 
| 
       19 
46 
     | 
    
         
             
              gem 'net-ssh'
         
     | 
    
        data/files/pki/template_ca.cnf
    CHANGED
    
    | 
         @@ -93,7 +93,7 @@ emailAddress		= optional 
     | 
|
| 
       93 
93 
     | 
    
         | 
| 
       94 
94 
     | 
    
         
             
            ####################################################################
         
     | 
| 
       95 
95 
     | 
    
         
             
            [ req ]
         
     | 
| 
       96 
     | 
    
         
            -
            default_bits		=  
     | 
| 
      
 96 
     | 
    
         
            +
            default_bits		= 4096
         
     | 
| 
       97 
97 
     | 
    
         
             
            default_keyfile 	= privkey.pem
         
     | 
| 
       98 
98 
     | 
    
         
             
            distinguished_name	= req_distinguished_name
         
     | 
| 
       99 
99 
     | 
    
         
             
            attributes		= req_attributes
         
     | 
    
        data/files/pki/template_host.cnf
    CHANGED
    
    | 
         @@ -96,7 +96,7 @@ emailAddress		= optional 
     | 
|
| 
       96 
96 
     | 
    
         | 
| 
       97 
97 
     | 
    
         
             
            ####################################################################
         
     | 
| 
       98 
98 
     | 
    
         
             
            [ req ]
         
     | 
| 
       99 
     | 
    
         
            -
            default_bits		=  
     | 
| 
      
 99 
     | 
    
         
            +
            default_bits		= 4096
         
     | 
| 
       100 
100 
     | 
    
         
             
            default_keyfile 	= privkey.pem
         
     | 
| 
       101 
101 
     | 
    
         
             
            distinguished_name	= req_distinguished_name
         
     | 
| 
       102 
102 
     | 
    
         
             
            attributes		= req_attributes
         
     | 
    
        data/lib/simp/beaker_helpers.rb
    CHANGED
    
    | 
         @@ -30,16 +30,38 @@ module Simp::BeakerHelpers 
     | 
|
| 
       30 
30 
     | 
    
         
             
                         ).output.strip == '1'
         
     | 
| 
       31 
31 
     | 
    
         
             
              end
         
     | 
| 
       32 
32 
     | 
    
         | 
| 
      
 33 
     | 
    
         
            +
              def rsync_functional_on?(sut)
         
     | 
| 
      
 34 
     | 
    
         
            +
                # We have to check if rsync *still* works otherwise
         
     | 
| 
      
 35 
     | 
    
         
            +
                return false if (@rsync_functional == false)
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                require 'facter'
         
     | 
| 
      
 38 
     | 
    
         
            +
                unless Facter::Util::Resolution.which('rsync')
         
     | 
| 
      
 39 
     | 
    
         
            +
                  @rsync_functional = false
         
     | 
| 
      
 40 
     | 
    
         
            +
                  return @rsync_functional
         
     | 
| 
      
 41 
     | 
    
         
            +
                end
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
                require 'tempfile'
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                testfile = Tempfile.new('rsync_check')
         
     | 
| 
      
 46 
     | 
    
         
            +
                testfile.puts('test')
         
     | 
| 
      
 47 
     | 
    
         
            +
                testfile.close
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
                begin
         
     | 
| 
      
 50 
     | 
    
         
            +
                  rsync_to(sut, testfile.path, sut.system_temp_path)
         
     | 
| 
      
 51 
     | 
    
         
            +
                rescue Beaker::Host::CommandFailure
         
     | 
| 
      
 52 
     | 
    
         
            +
                  @rsync_functional = false
         
     | 
| 
      
 53 
     | 
    
         
            +
                  return false
         
     | 
| 
      
 54 
     | 
    
         
            +
                ensure
         
     | 
| 
      
 55 
     | 
    
         
            +
                  testfile.unlink
         
     | 
| 
      
 56 
     | 
    
         
            +
                end
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
                return true
         
     | 
| 
      
 59 
     | 
    
         
            +
              end
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
       33 
61 
     | 
    
         
             
              # Figure out the best method to copy files to a host and use it
         
     | 
| 
       34 
62 
     | 
    
         
             
              #
         
     | 
| 
       35 
63 
     | 
    
         
             
              # Will create the directories leading up to the target if they don't exist
         
     | 
| 
       36 
64 
     | 
    
         
             
              def copy_to(sut, src, dest, opts={})
         
     | 
| 
       37 
     | 
    
         
            -
                unless fips_enabled(sut) || @has_rsync
         
     | 
| 
       38 
     | 
    
         
            -
                  %x{which rsync 2>/dev/null}.strip
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
                  @has_rsync = !$?.nil? && $?.success?
         
     | 
| 
       41 
     | 
    
         
            -
                end
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
65 
     | 
    
         
             
                sut.mkdir_p(File.dirname(dest))
         
     | 
| 
       44 
66 
     | 
    
         | 
| 
       45 
67 
     | 
    
         
             
                if sut[:hypervisor] == 'docker'
         
     | 
| 
         @@ -57,7 +79,7 @@ module Simp::BeakerHelpers 
     | 
|
| 
       57 
79 
     | 
    
         
             
                    container_id = sut.host_hash[:docker_container_id]
         
     | 
| 
       58 
80 
     | 
    
         
             
                  end
         
     | 
| 
       59 
81 
     | 
    
         
             
                  %x(tar #{exclude_list.join(' ')} -hcf - -C "#{File.dirname(src)}" "#{File.basename(src)}" | docker exec -i "#{container_id}" tar -C "#{dest}" -xf -)
         
     | 
| 
       60 
     | 
    
         
            -
                elsif  
     | 
| 
      
 82 
     | 
    
         
            +
                elsif rsync_functional_on?(sut)
         
     | 
| 
       61 
83 
     | 
    
         
             
                  # This makes rsync_to work like beaker and scp usually do
         
     | 
| 
       62 
84 
     | 
    
         
             
                  exclude_hack = %(__-__' -L --exclude '__-__)
         
     | 
| 
       63 
85 
     | 
    
         | 
| 
         @@ -297,7 +319,7 @@ module Simp::BeakerHelpers 
     | 
|
| 
       297 
319 
     | 
    
         
             
                  # TODO Use simp-ssh Puppet module appropriately (i.e., in a fashion
         
     | 
| 
       298 
320 
     | 
    
         
             
                  #      that doesn't break vagrant access and is appropriate for
         
     | 
| 
       299 
321 
     | 
    
         
             
                  #      typical module tests.)
         
     | 
| 
       300 
     | 
    
         
            -
                  fips_ssh_ciphers = [ 'aes256- 
     | 
| 
      
 322 
     | 
    
         
            +
                  fips_ssh_ciphers = [ 'aes256-ctr','aes192-ctr','aes128-ctr']
         
     | 
| 
       301 
323 
     | 
    
         
             
                  on(sut, %(sed -i '/Ciphers /d' /etc/ssh/sshd_config))
         
     | 
| 
       302 
324 
     | 
    
         
             
                  on(sut, %(echo 'Ciphers #{fips_ssh_ciphers.join(',')}' >> /etc/ssh/sshd_config))
         
     | 
| 
       303 
325 
     | 
    
         | 
| 
         @@ -333,8 +355,8 @@ module Simp::BeakerHelpers 
     | 
|
| 
       333 
355 
     | 
    
         
             
                  # Hopefully, Vagrant will update the used ciphers at some point but who
         
     | 
| 
       334 
356 
     | 
    
         
             
                  # knows when that will be
         
     | 
| 
       335 
357 
     | 
    
         
             
                  opensshserver_config = '/etc/crypto-policies/back-ends/opensshserver.config'
         
     | 
| 
       336 
     | 
    
         
            -
                  if file_exists_on( 
     | 
| 
       337 
     | 
    
         
            -
                    on( 
     | 
| 
      
 358 
     | 
    
         
            +
                  if file_exists_on(sut, opensshserver_config)
         
     | 
| 
      
 359 
     | 
    
         
            +
                    on(sut, "sed --follow-symlinks -i 's/PubkeyAcceptedKeyTypes=/PubkeyAcceptedKeyTypes=ssh-rsa,/' #{opensshserver_config}")
         
     | 
| 
       338 
360 
     | 
    
         
             
                  end
         
     | 
| 
       339 
361 
     | 
    
         | 
| 
       340 
362 
     | 
    
         
             
                  sut.reboot
         
     | 
| 
         @@ -584,7 +606,7 @@ module Simp::BeakerHelpers 
     | 
|
| 
       584 
606 
     | 
    
         
             
              end
         
     | 
| 
       585 
607 
     | 
    
         | 
| 
       586 
608 
     | 
    
         
             
              def sosreport(sut, dest='sosreports')
         
     | 
| 
       587 
     | 
    
         
            -
                sut 
     | 
| 
      
 609 
     | 
    
         
            +
                on(sut, 'puppet resource package sos ensure=latest')
         
     | 
| 
       588 
610 
     | 
    
         
             
                on(sut, 'sosreport --batch')
         
     | 
| 
       589 
611 
     | 
    
         | 
| 
       590 
612 
     | 
    
         
             
                files = on(sut, 'ls /var/tmp/sosreport* /tmp/sosreport* 2>/dev/null', :accept_all_exit_codes => true).output.lines.map(&:strip)
         
     | 
| 
         @@ -1170,62 +1192,70 @@ done 
     | 
|
| 
       1170 
1192 
     | 
    
         
             
                run_puppet_install_helper(install_info[:puppet_install_type], install_info[:puppet_install_version])
         
     | 
| 
       1171 
1193 
     | 
    
         
             
              end
         
     | 
| 
       1172 
1194 
     | 
    
         | 
| 
       1173 
     | 
    
         
            -
              # Configure all SIMP repos on a host and  
     | 
| 
      
 1195 
     | 
    
         
            +
              # Configure all SIMP repos on a host and disable all repos in the disable Array
         
     | 
| 
       1174 
1196 
     | 
    
         
             
              #
         
     | 
| 
       1175 
     | 
    
         
            -
              # @param sut Host on which to configure SIMP repos
         
     | 
| 
       1176 
     | 
    
         
            -
              # @param disable List of  
     | 
| 
       1177 
     | 
    
         
            -
              # @raise if disable contains an invalid repo name.
         
     | 
| 
      
 1197 
     | 
    
         
            +
              # @param sut [Beaker::Host]  Host on which to configure SIMP repos
         
     | 
| 
      
 1198 
     | 
    
         
            +
              # @param disable [Array[String]] List of repos to disable
         
     | 
| 
      
 1199 
     | 
    
         
            +
              # @raise [StandardError] if disable contains an invalid repo name.
         
     | 
| 
       1178 
1200 
     | 
    
         
             
              #
         
     | 
| 
       1179 
1201 
     | 
    
         
             
              # Examples:
         
     | 
| 
       1180 
1202 
     | 
    
         
             
              #  install_simp_repos( myhost )           # install all the repos an enable them.
         
     | 
| 
       1181 
1203 
     | 
    
         
             
              #  install_simp_repos( myhost, ['simp'])  # install the repos but disable the simp repo.
         
     | 
| 
       1182 
1204 
     | 
    
         
             
              #
         
     | 
| 
       1183 
     | 
    
         
            -
              #  
     | 
| 
       1184 
     | 
    
         
            -
              #  'simp'
         
     | 
| 
       1185 
     | 
    
         
            -
              #  'simp_deps'
         
     | 
| 
      
 1205 
     | 
    
         
            +
              # Valid repo names include any repository available on the system.
         
     | 
| 
       1186 
1206 
     | 
    
         
             
              #
         
     | 
| 
       1187 
     | 
    
         
            -
               
     | 
| 
       1188 
     | 
    
         
            -
             
     | 
| 
       1189 
     | 
    
         
            -
             
     | 
| 
       1190 
     | 
    
         
            -
             
     | 
| 
       1191 
     | 
    
         
            -
             
     | 
| 
       1192 
     | 
    
         
            -
             
     | 
| 
       1193 
     | 
    
         
            -
             
     | 
| 
       1194 
     | 
    
         
            -
             
     | 
| 
       1195 
     | 
    
         
            -
             
     | 
| 
       1196 
     | 
    
         
            -
             
     | 
| 
       1197 
     | 
    
         
            -
             
     | 
| 
       1198 
     | 
    
         
            -
             
     | 
| 
       1199 
     | 
    
         
            -
             
     | 
| 
       1200 
     | 
    
         
            -
             
     | 
| 
       1201 
     | 
    
         
            -
             
     | 
| 
       1202 
     | 
    
         
            -
             
     | 
| 
       1203 
     | 
    
         
            -
             
     | 
| 
       1204 
     | 
    
         
            -
             
     | 
| 
       1205 
     | 
    
         
            -
             
     | 
| 
       1206 
     | 
    
         
            -
             
     | 
| 
       1207 
     | 
    
         
            -
             
     | 
| 
       1208 
     | 
    
         
            -
             
     | 
| 
       1209 
     | 
    
         
            -
             
     | 
| 
       1210 
     | 
    
         
            -
             
     | 
| 
       1211 
     | 
    
         
            -
             
     | 
| 
       1212 
     | 
    
         
            -
             
     | 
| 
       1213 
     | 
    
         
            -
                     
     | 
| 
       1214 
     | 
    
         
            -
             
     | 
| 
       1215 
     | 
    
         
            -
                }
         
     | 
| 
       1216 
     | 
    
         
            -
                # Verify that the repos passed to disable are in the list of valid repos
         
     | 
| 
       1217 
     | 
    
         
            -
                disable.each { |d|
         
     | 
| 
       1218 
     | 
    
         
            -
                  unless repos.has_key?(d)
         
     | 
| 
       1219 
     | 
    
         
            -
                    raise("ERROR: install_simp_repo - disable contains invalid SIMP repo '#{d}'.")
         
     | 
| 
      
 1207 
     | 
    
         
            +
              # For backwards compatibility purposes, the following translations are
         
     | 
| 
      
 1208 
     | 
    
         
            +
              # automatically performed:
         
     | 
| 
      
 1209 
     | 
    
         
            +
              #
         
     | 
| 
      
 1210 
     | 
    
         
            +
              #  * 'simp'
         
     | 
| 
      
 1211 
     | 
    
         
            +
              #    * 'simp-community-simp'
         
     | 
| 
      
 1212 
     | 
    
         
            +
              #
         
     | 
| 
      
 1213 
     | 
    
         
            +
              #  * 'simp_deps'
         
     | 
| 
      
 1214 
     | 
    
         
            +
              #    * 'simp-community-epel'
         
     | 
| 
      
 1215 
     | 
    
         
            +
              #    * 'simp-community-postgres'
         
     | 
| 
      
 1216 
     | 
    
         
            +
              #    * 'simp-community-puppet'
         
     | 
| 
      
 1217 
     | 
    
         
            +
              #
         
     | 
| 
      
 1218 
     | 
    
         
            +
              def install_simp_repos(sut, disable = [])
         
     | 
| 
      
 1219 
     | 
    
         
            +
                # NOTE: Do *NOT* use puppet in this method since it may not be available yet
         
     | 
| 
      
 1220 
     | 
    
         
            +
             
     | 
| 
      
 1221 
     | 
    
         
            +
                if on(sut, 'rpm -q yum-utils', :accept_all_exit_codes => true).exit_code != 0
         
     | 
| 
      
 1222 
     | 
    
         
            +
                  on(sut, 'yum -y install yum-utils')
         
     | 
| 
      
 1223 
     | 
    
         
            +
                end
         
     | 
| 
      
 1224 
     | 
    
         
            +
             
     | 
| 
      
 1225 
     | 
    
         
            +
                if on(sut, 'rpm -q simp-release-community', :accept_all_exit_codes => true).exit_code != 0
         
     | 
| 
      
 1226 
     | 
    
         
            +
                  on(sut, 'yum -y install "https://download.simp-project.com/simp-release-community.rpm"')
         
     | 
| 
      
 1227 
     | 
    
         
            +
                end
         
     | 
| 
      
 1228 
     | 
    
         
            +
             
     | 
| 
      
 1229 
     | 
    
         
            +
                to_disable = disable.dup
         
     | 
| 
      
 1230 
     | 
    
         
            +
             
     | 
| 
      
 1231 
     | 
    
         
            +
                unless to_disable.empty?
         
     | 
| 
      
 1232 
     | 
    
         
            +
                  if to_disable.include?('simp')
         
     | 
| 
      
 1233 
     | 
    
         
            +
                    to_disable.delete('simp')
         
     | 
| 
      
 1234 
     | 
    
         
            +
                    to_disable << 'simp-community-simp'
         
     | 
| 
       1220 
1235 
     | 
    
         
             
                  end
         
     | 
| 
       1221 
     | 
    
         
            -
                }
         
     | 
| 
       1222 
     | 
    
         
            -
                repo_manifest = ''
         
     | 
| 
       1223 
     | 
    
         
            -
                repos.each { | repo, metadata|
         
     | 
| 
       1224 
     | 
    
         
            -
                  metadata[:enabled] = disable.include?(repo) ? 0 : 1
         
     | 
| 
       1225 
     | 
    
         
            -
                  repo_manifest << create_yum_resource(repo, metadata)
         
     | 
| 
       1226 
     | 
    
         
            -
                }
         
     | 
| 
       1227 
     | 
    
         
            -
                apply_manifest_on(sut, repo_manifest, :catch_failures => true)
         
     | 
| 
       1228 
     | 
    
         
            -
              end
         
     | 
| 
       1229 
     | 
    
         
            -
            end
         
     | 
| 
       1230 
1236 
     | 
    
         | 
| 
      
 1237 
     | 
    
         
            +
                  if to_disable.include?('simp_deps')
         
     | 
| 
      
 1238 
     | 
    
         
            +
                    to_disable.delete('simp_deps')
         
     | 
| 
      
 1239 
     | 
    
         
            +
                    to_disable << 'simp-community-epel'
         
     | 
| 
      
 1240 
     | 
    
         
            +
                    to_disable << 'simp-community-postgres'
         
     | 
| 
      
 1241 
     | 
    
         
            +
                    to_disable << 'simp-community-puppet'
         
     | 
| 
      
 1242 
     | 
    
         
            +
                  end
         
     | 
| 
       1231 
1243 
     | 
    
         | 
| 
      
 1244 
     | 
    
         
            +
                  # NOTE: This --enablerepo enables the repos for listing and is inherited
         
     | 
| 
      
 1245 
     | 
    
         
            +
                  # from YUM. This does not actually "enable" the repos, that would require
         
     | 
| 
      
 1246 
     | 
    
         
            +
                  # the "--enable" option (from yum-config-manager) :-D.
         
     | 
| 
      
 1247 
     | 
    
         
            +
                  available_repos = on(sut, %{yum-config-manager --enablerepo="*"}).stdout.lines.grep(/\A\[(.+)\]\Z/){|x| $1}
         
     | 
| 
      
 1248 
     | 
    
         
            +
             
     | 
| 
      
 1249 
     | 
    
         
            +
                  invalid_repos = (to_disable - available_repos)
         
     | 
| 
      
 1250 
     | 
    
         
            +
             
     | 
| 
      
 1251 
     | 
    
         
            +
                  # Verify that the repos passed to disable are in the list of valid repos
         
     | 
| 
      
 1252 
     | 
    
         
            +
                  unless invalid_repos.empty?
         
     | 
| 
      
 1253 
     | 
    
         
            +
                    logger.warn(%{WARN: install_simp_repo - requested repos to disable do not exist on the target system '#{invalid_repos.join("', '")}'.})
         
     | 
| 
      
 1254 
     | 
    
         
            +
                  end
         
     | 
| 
      
 1255 
     | 
    
         
            +
             
     | 
| 
      
 1256 
     | 
    
         
            +
                  (to_disable - invalid_repos).each do |repo|
         
     | 
| 
      
 1257 
     | 
    
         
            +
                    on(sut, %{yum-config-manager --disable "#{repo}"})
         
     | 
| 
      
 1258 
     | 
    
         
            +
                  end
         
     | 
| 
      
 1259 
     | 
    
         
            +
                end
         
     | 
| 
      
 1260 
     | 
    
         
            +
              end
         
     | 
| 
      
 1261 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -1,5 +1,5 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module Simp::BeakerHelpers
         
     | 
| 
       2 
     | 
    
         
            -
              # Helpers for  
     | 
| 
      
 2 
     | 
    
         
            +
              # Helpers for managing Vagrant snapshots
         
     | 
| 
       3 
3 
     | 
    
         
             
              class Snapshot
         
     | 
| 
       4 
4 
     | 
    
         
             
                # The name of the base snapshot that is created if no snapshots currently exist
         
     | 
| 
       5 
5 
     | 
    
         
             
                BASE_NAME = '_simp_beaker_base'
         
     | 
| 
         @@ -18,9 +18,7 @@ module Simp::BeakerHelpers 
     | 
|
| 
       18 
18 
     | 
    
         | 
| 
       19 
19 
     | 
    
         
             
                    if vdir
         
     | 
| 
       20 
20 
     | 
    
         
             
                      Dir.chdir(vdir) do
         
     | 
| 
       21 
     | 
    
         
            -
                        unless exist?(host, BASE_NAME)
         
     | 
| 
       22 
     | 
    
         
            -
                          save(host, BASE_NAME)
         
     | 
| 
       23 
     | 
    
         
            -
                        end
         
     | 
| 
      
 21 
     | 
    
         
            +
                        save(host, BASE_NAME) unless exist?(host, BASE_NAME)
         
     | 
| 
       24 
22 
     | 
    
         | 
| 
       25 
23 
     | 
    
         
             
                        snap = "#{host.name}_#{snapshot_name}"
         
     | 
| 
       26 
24 
     | 
    
         | 
| 
         @@ -67,7 +65,7 @@ module Simp::BeakerHelpers 
     | 
|
| 
       67 
65 
     | 
    
         
             
                    Dir.chdir(vdir) do
         
     | 
| 
       68 
66 
     | 
    
         
             
                      output = %x(vagrant snapshot list #{host.name}).lines
         
     | 
| 
       69 
67 
     | 
    
         
             
                      output.map! do |x|
         
     | 
| 
       70 
     | 
    
         
            -
                        x.split(/^#{host.name}_/).last.strip
         
     | 
| 
      
 68 
     | 
    
         
            +
                        x.split(/^#{host.name}_/).last.split(':').first.delete('==>').strip
         
     | 
| 
       71 
69 
     | 
    
         
             
                      end
         
     | 
| 
       72 
70 
     | 
    
         
             
                    end
         
     | 
| 
       73 
71 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -9,8 +9,8 @@ HOSTS: 
     | 
|
| 
       9 
9 
     | 
    
         
             
              server-el7:
         
     | 
| 
       10 
10 
     | 
    
         
             
                roles:
         
     | 
| 
       11 
11 
     | 
    
         
             
                  - server
         
     | 
| 
       12 
     | 
    
         
            -
                  - default
         
     | 
| 
       13 
12 
     | 
    
         
             
                  - master
         
     | 
| 
      
 13 
     | 
    
         
            +
                  - default
         
     | 
| 
       14 
14 
     | 
    
         
             
                  - el7
         
     | 
| 
       15 
15 
     | 
    
         
             
                platform: el-7-x86_64
         
     | 
| 
       16 
16 
     | 
    
         
             
                box: centos/7
         
     | 
| 
         @@ -23,6 +23,13 @@ HOSTS: 
     | 
|
| 
       23 
23 
     | 
    
         
             
                box: centos/6
         
     | 
| 
       24 
24 
     | 
    
         
             
                hypervisor: <%= hypervisor %>
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
      
 26 
     | 
    
         
            +
              server-el8:
         
     | 
| 
      
 27 
     | 
    
         
            +
                roles:
         
     | 
| 
      
 28 
     | 
    
         
            +
                  - el8
         
     | 
| 
      
 29 
     | 
    
         
            +
                platform: el-8-x86_64
         
     | 
| 
      
 30 
     | 
    
         
            +
                box: centos/8
         
     | 
| 
      
 31 
     | 
    
         
            +
                hypervisor: <%= hypervisor %>
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
       26 
33 
     | 
    
         
             
            CONFIG:
         
     | 
| 
       27 
34 
     | 
    
         
             
              log_level: verbose
         
     | 
| 
       28 
35 
     | 
    
         
             
              type: aio
         
     | 
| 
         @@ -2,42 +2,36 @@ require 'spec_helper_acceptance' 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            hosts.each do |host|
         
     | 
| 
       4 
4 
     | 
    
         
             
              describe '#write_hieradata_to' do
         
     | 
| 
      
 5 
     | 
    
         
            +
                expect_failures = false
         
     | 
| 
      
 6 
     | 
    
         
            +
                if hosts_with_role(hosts, 'el8').include?(host)
         
     | 
| 
      
 7 
     | 
    
         
            +
                  expect_failures = true
         
     | 
| 
      
 8 
     | 
    
         
            +
                end
         
     | 
| 
       5 
9 
     | 
    
         | 
| 
       6 
10 
     | 
    
         
             
                it 'should install yum utils' do
         
     | 
| 
       7 
11 
     | 
    
         
             
                  host.install_package('yum-utils')
         
     | 
| 
       8 
12 
     | 
    
         
             
                end
         
     | 
| 
       9 
13 
     | 
    
         | 
| 
       10 
     | 
    
         
            -
                context ' 
     | 
| 
      
 14 
     | 
    
         
            +
                context 'default settings' do
         
     | 
| 
       11 
15 
     | 
    
         
             
                  before(:all) { install_simp_repos(host) }
         
     | 
| 
       12 
16 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
                  it 'creates the repo' do
         
     | 
| 
       14 
     | 
    
         
            -
                    on host, 'test -f /etc/yum.repos.d/simp.repo'
         
     | 
| 
       15 
     | 
    
         
            -
                    on host, 'test -f /etc/yum.repos.d/simp_deps.repo'
         
     | 
| 
       16 
     | 
    
         
            -
                  end
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
17 
     | 
    
         
             
                  it 'enables the correct repos' do
         
     | 
| 
       19 
     | 
    
         
            -
                     
     | 
| 
       20 
     | 
    
         
            -
                     
     | 
| 
       21 
     | 
    
         
            -
                     
     | 
| 
       22 
     | 
    
         
            -
                    expect(simp6depsinfo).to match(/.*Repo-status.*enabled.*/)
         
     | 
| 
      
 18 
     | 
    
         
            +
                    skip "#{host} is not supported yet" if expect_failures
         
     | 
| 
      
 19 
     | 
    
         
            +
                    on(host, 'yum -y list simp')
         
     | 
| 
      
 20 
     | 
    
         
            +
                    on(host, 'yum -y list postgresql96')
         
     | 
| 
       23 
21 
     | 
    
         
             
                  end
         
     | 
| 
       24 
22 
     | 
    
         
             
                end
         
     | 
| 
       25 
23 
     | 
    
         | 
| 
       26 
24 
     | 
    
         
             
                context 'when passed a disabled list ' do
         
     | 
| 
       27 
     | 
    
         
            -
                  before(:all) { install_simp_repos(host, ['simp'] ) }
         
     | 
| 
      
 25 
     | 
    
         
            +
                  before(:all) { install_simp_repos(host, ['simp-community-simp'] ) }
         
     | 
| 
       28 
26 
     | 
    
         | 
| 
       29 
     | 
    
         
            -
                  it ' 
     | 
| 
       30 
     | 
    
         
            -
                     
     | 
| 
       31 
     | 
    
         
            -
                    on 
     | 
| 
      
 27 
     | 
    
         
            +
                  it 'enables the correct repos' do
         
     | 
| 
      
 28 
     | 
    
         
            +
                    skip "#{host} is not supported yet" if expect_failures
         
     | 
| 
      
 29 
     | 
    
         
            +
                    on(host, 'yum -y list postgresql96')
         
     | 
| 
       32 
30 
     | 
    
         
             
                  end
         
     | 
| 
       33 
31 
     | 
    
         | 
| 
       34 
     | 
    
         
            -
                  it ' 
     | 
| 
       35 
     | 
    
         
            -
                     
     | 
| 
       36 
     | 
    
         
            -
                    expect(simp6info).to match(/.*Repo-status.*disabled.*/)
         
     | 
| 
       37 
     | 
    
         
            -
                    simp6depsinfo = on(host, 'yum repolist -v simp_deps| grep ^Repo-status').stdout.strip
         
     | 
| 
       38 
     | 
    
         
            -
                    expect(simp6depsinfo).to match(/.*Repo-status.*enabled.*/)
         
     | 
| 
      
 32 
     | 
    
         
            +
                  it 'disables the correct repos' do
         
     | 
| 
      
 33 
     | 
    
         
            +
                    on(host, 'yum -y list simp', :acceptable_exit_codes => [1])
         
     | 
| 
       39 
34 
     | 
    
         
             
                  end
         
     | 
| 
       40 
35 
     | 
    
         
             
                end
         
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
36 
     | 
    
         
             
              end
         
     | 
| 
       43 
37 
     | 
    
         
             
            end
         
     | 
| 
         @@ -31,7 +31,10 @@ ScrubFixtures.new 
     | 
|
| 
       31 
31 
     | 
    
         
             
            ENV['BEAKER_fips'] = 'yes'
         
     | 
| 
       32 
32 
     | 
    
         
             
            ENV['FIXTURES_YML'] = alt_fixtures
         
     | 
| 
       33 
33 
     | 
    
         | 
| 
      
 34 
     | 
    
         
            +
            beaker_gem_options = ENV['BEAKER_GEM_OPTIONS']
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
       34 
36 
     | 
    
         
             
            Bundler.with_clean_env{
         
     | 
| 
      
 37 
     | 
    
         
            +
              ENV['BEAKER_GEM_OPTIONS'] = beaker_gem_options
         
     | 
| 
       35 
38 
     | 
    
         
             
              ENV['FIXTURES_YML'] = alt_fixtures
         
     | 
| 
       36 
39 
     | 
    
         | 
| 
       37 
40 
     | 
    
         
             
              %x{bundle exec rake spec_prep}
         
     | 
| 
         @@ -1,24 +1,22 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # This needs to be done so that we actually bring in a collection at the start
         
     | 
| 
       2 
     | 
    
         
            -
            # of the run
         
     | 
| 
       3 
     | 
    
         
            -
            #
         
     | 
| 
       4 
     | 
    
         
            -
            # Choosing an arbitrary number in the middle of 5 so that we're not fooled by
         
     | 
| 
       5 
     | 
    
         
            -
            # edge cases
         
     | 
| 
       6 
     | 
    
         
            -
            #
         
     | 
| 
       7 
     | 
    
         
            -
            ENV['PUPPET_VERSION'] = '5.1'
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
1 
     | 
    
         
             
            require 'spec_helper_acceptance'
         
     | 
| 
       10 
2 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
               
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
      
 3 
     | 
    
         
            +
            unless ENV['PUPPET_VERSION'] || ENV['BEAKER_PUPPET_COLLECTION']
         
     | 
| 
      
 4 
     | 
    
         
            +
              fail('You must set either PUPPET_VERSION or BEAKER_PUPPET_COLLECTION as an environment variable')
         
     | 
| 
      
 5 
     | 
    
         
            +
            end
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            if ENV['BEAKER_PUPPET_COLLECTION']
         
     | 
| 
      
 8 
     | 
    
         
            +
              target_version = ENV['BEAKER_PUPPET_COLLECTION'][/(\d+)$/,1]
         
     | 
| 
      
 9 
     | 
    
         
            +
            elsif ENV['PUPPET_VERSION']
         
     | 
| 
      
 10 
     | 
    
         
            +
              target_version = ENV['PUPPET_VERSION'].split('.').first
         
     | 
| 
      
 11 
     | 
    
         
            +
            end
         
     | 
| 
       14 
12 
     | 
    
         | 
| 
       15 
13 
     | 
    
         
             
            hosts.each do |host|
         
     | 
| 
       16 
14 
     | 
    
         
             
              describe 'make sure puppet version is valid' do
         
     | 
| 
       17 
15 
     | 
    
         
             
                context "on #{host}" do
         
     | 
| 
       18 
16 
     | 
    
         
             
                  client_puppet_version = on(host, 'puppet --version').output.strip
         
     | 
| 
       19 
17 
     | 
    
         | 
| 
       20 
     | 
    
         
            -
                  it "should be running puppet version #{ 
     | 
| 
       21 
     | 
    
         
            -
                    expect(Gem::Version.new(client_puppet_version)).to be >= Gem::Version.new( 
     | 
| 
      
 18 
     | 
    
         
            +
                  it "should be running puppet version #{target_version}" do
         
     | 
| 
      
 19 
     | 
    
         
            +
                    expect(Gem::Version.new(client_puppet_version)).to be >= Gem::Version.new(target_version)
         
     | 
| 
       22 
20 
     | 
    
         
             
                  end
         
     | 
| 
       23 
21 
     | 
    
         
             
                end
         
     | 
| 
       24 
22 
     | 
    
         
             
              end
         
     | 
| 
         @@ -57,7 +57,7 @@ hosts.each do |host| 
     | 
|
| 
       57 
57 
     | 
    
         
             
                  end
         
     | 
| 
       58 
58 
     | 
    
         | 
| 
       59 
59 
     | 
    
         
             
                  it 'can list the snapshots' do
         
     | 
| 
       60 
     | 
    
         
            -
                    expect(Simp::BeakerHelpers::Snapshot.list(host)).to eq ['test', 'test2']
         
     | 
| 
      
 60 
     | 
    
         
            +
                    expect(Simp::BeakerHelpers::Snapshot.list(host)).to eq ["#{host}", 'test', 'test2']
         
     | 
| 
       61 
61 
     | 
    
         
             
                  end
         
     | 
| 
       62 
62 
     | 
    
         | 
| 
       63 
63 
     | 
    
         
             
                  it 'can query for a specific snapshot' do
         
     | 
| 
         @@ -10,12 +10,14 @@ HOSTS: 
     | 
|
| 
       10 
10 
     | 
    
         
             
                roles:
         
     | 
| 
       11 
11 
     | 
    
         
             
                  - windows
         
     | 
| 
       12 
12 
     | 
    
         
             
                platform: windows-server-amd64
         
     | 
| 
       13 
     | 
    
         
            -
                box:  
     | 
| 
      
 13 
     | 
    
         
            +
                box: devopsgroup-io/windows_server-2012r2-standard-amd64-nocm
         
     | 
| 
       14 
14 
     | 
    
         
             
                hypervisor: <%= hypervisor %>
         
     | 
| 
       15 
15 
     | 
    
         
             
                vagrant_memsize: 2048
         
     | 
| 
       16 
16 
     | 
    
         
             
                vagrant_cpus: 2
         
     | 
| 
       17 
17 
     | 
    
         
             
                user: vagrant
         
     | 
| 
       18 
18 
     | 
    
         
             
                is_cygwin: false
         
     | 
| 
      
 19 
     | 
    
         
            +
                ssh:
         
     | 
| 
      
 20 
     | 
    
         
            +
                  host_key: ssh-dss
         
     | 
| 
       19 
21 
     | 
    
         | 
| 
       20 
22 
     | 
    
         
             
              el7:
         
     | 
| 
       21 
23 
     | 
    
         
             
                roles:
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: simp-beaker-helpers
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.19.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Chris Tessmer
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2020- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2020-10-01 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: beaker
         
     | 
| 
         @@ -203,7 +203,6 @@ files: 
     | 
|
| 
       203 
203 
     | 
    
         
             
            - spec/acceptance/suites/offline/nodesets/default.yml
         
     | 
| 
       204 
204 
     | 
    
         
             
            - spec/acceptance/suites/puppet_collections/00_default_spec.rb
         
     | 
| 
       205 
205 
     | 
    
         
             
            - spec/acceptance/suites/puppet_collections/metadata.yml
         
     | 
| 
       206 
     | 
    
         
            -
            - spec/acceptance/suites/puppet_collections/nodesets/default.yml
         
     | 
| 
       207 
206 
     | 
    
         
             
            - spec/acceptance/suites/snapshot/00_snapshot_test_spec.rb
         
     | 
| 
       208 
207 
     | 
    
         
             
            - spec/acceptance/suites/snapshot/10_general_usage_spec.rb
         
     | 
| 
       209 
208 
     | 
    
         
             
            - spec/acceptance/suites/snapshot/nodesets
         
     | 
| 
         @@ -235,37 +234,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       235 
234 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       236 
235 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       237 
236 
     | 
    
         
             
            requirements: []
         
     | 
| 
       238 
     | 
    
         
            -
            rubygems_version: 3.0. 
     | 
| 
      
 237 
     | 
    
         
            +
            rubygems_version: 3.0.8
         
     | 
| 
       239 
238 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       240 
239 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       241 
240 
     | 
    
         
             
            summary: beaker helper methods for SIMP
         
     | 
| 
       242 
     | 
    
         
            -
            test_files:
         
     | 
| 
       243 
     | 
    
         
            -
            - spec/acceptance/nodesets/default.yml
         
     | 
| 
       244 
     | 
    
         
            -
            - spec/acceptance/suites/default/check_puppet_version_spec.rb
         
     | 
| 
       245 
     | 
    
         
            -
            - spec/acceptance/suites/default/enable_fips_spec.rb
         
     | 
| 
       246 
     | 
    
         
            -
            - spec/acceptance/suites/default/fixture_modules_spec.rb
         
     | 
| 
       247 
     | 
    
         
            -
            - spec/acceptance/suites/default/install_simp_deps_repo_spec.rb
         
     | 
| 
       248 
     | 
    
         
            -
            - spec/acceptance/suites/default/nodesets
         
     | 
| 
       249 
     | 
    
         
            -
            - spec/acceptance/suites/default/pki_tests_spec.rb
         
     | 
| 
       250 
     | 
    
         
            -
            - spec/acceptance/suites/default/set_hieradata_on_spec.rb
         
     | 
| 
       251 
     | 
    
         
            -
            - spec/acceptance/suites/default/write_hieradata_to_spec.rb
         
     | 
| 
       252 
     | 
    
         
            -
            - spec/acceptance/suites/fips_from_fixtures/00_default_spec.rb
         
     | 
| 
       253 
     | 
    
         
            -
            - spec/acceptance/suites/fips_from_fixtures/metadata.yml
         
     | 
| 
       254 
     | 
    
         
            -
            - spec/acceptance/suites/fips_from_fixtures/nodesets
         
     | 
| 
       255 
     | 
    
         
            -
            - spec/acceptance/suites/offline/00_default_spec.rb
         
     | 
| 
       256 
     | 
    
         
            -
            - spec/acceptance/suites/offline/README
         
     | 
| 
       257 
     | 
    
         
            -
            - spec/acceptance/suites/offline/nodesets/default.yml
         
     | 
| 
       258 
     | 
    
         
            -
            - spec/acceptance/suites/puppet_collections/00_default_spec.rb
         
     | 
| 
       259 
     | 
    
         
            -
            - spec/acceptance/suites/puppet_collections/metadata.yml
         
     | 
| 
       260 
     | 
    
         
            -
            - spec/acceptance/suites/puppet_collections/nodesets/default.yml
         
     | 
| 
       261 
     | 
    
         
            -
            - spec/acceptance/suites/snapshot/00_snapshot_test_spec.rb
         
     | 
| 
       262 
     | 
    
         
            -
            - spec/acceptance/suites/snapshot/10_general_usage_spec.rb
         
     | 
| 
       263 
     | 
    
         
            -
            - spec/acceptance/suites/snapshot/nodesets
         
     | 
| 
       264 
     | 
    
         
            -
            - spec/acceptance/suites/windows/00_default_spec.rb
         
     | 
| 
       265 
     | 
    
         
            -
            - spec/acceptance/suites/windows/metadata.yml
         
     | 
| 
       266 
     | 
    
         
            -
            - spec/acceptance/suites/windows/nodesets/default.yml
         
     | 
| 
       267 
     | 
    
         
            -
            - spec/acceptance/suites/windows/nodesets/win2016.yml
         
     | 
| 
       268 
     | 
    
         
            -
            - spec/acceptance/suites/windows/nodesets/win2019.yml
         
     | 
| 
       269 
     | 
    
         
            -
            - spec/lib/simp/beaker_helpers_spec.rb
         
     | 
| 
       270 
     | 
    
         
            -
            - spec/spec_helper.rb
         
     | 
| 
       271 
     | 
    
         
            -
            - spec/spec_helper_acceptance.rb
         
     | 
| 
      
 241 
     | 
    
         
            +
            test_files: []
         
     | 
| 
         @@ -1,30 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            <%
         
     | 
| 
       2 
     | 
    
         
            -
              if ENV['BEAKER_HYPERVISOR']
         
     | 
| 
       3 
     | 
    
         
            -
                hypervisor = ENV['BEAKER_HYPERVISOR']
         
     | 
| 
       4 
     | 
    
         
            -
              else
         
     | 
| 
       5 
     | 
    
         
            -
                hypervisor = 'vagrant'
         
     | 
| 
       6 
     | 
    
         
            -
              end
         
     | 
| 
       7 
     | 
    
         
            -
            -%>
         
     | 
| 
       8 
     | 
    
         
            -
            HOSTS:
         
     | 
| 
       9 
     | 
    
         
            -
              server-el7:
         
     | 
| 
       10 
     | 
    
         
            -
                roles:
         
     | 
| 
       11 
     | 
    
         
            -
                  - server
         
     | 
| 
       12 
     | 
    
         
            -
                  - default
         
     | 
| 
       13 
     | 
    
         
            -
                  - master
         
     | 
| 
       14 
     | 
    
         
            -
                  - el7
         
     | 
| 
       15 
     | 
    
         
            -
                platform: el-7-x86_64
         
     | 
| 
       16 
     | 
    
         
            -
                box: centos/7
         
     | 
| 
       17 
     | 
    
         
            -
                hypervisor: <%= hypervisor %>
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
              server-el6:
         
     | 
| 
       20 
     | 
    
         
            -
                roles:
         
     | 
| 
       21 
     | 
    
         
            -
                  - el6
         
     | 
| 
       22 
     | 
    
         
            -
                platform: el-6-x86_64
         
     | 
| 
       23 
     | 
    
         
            -
                box: centos/6
         
     | 
| 
       24 
     | 
    
         
            -
                hypervisor: <%= hypervisor %>
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
            CONFIG:
         
     | 
| 
       27 
     | 
    
         
            -
              log_level: verbose
         
     | 
| 
       28 
     | 
    
         
            -
              type: aio
         
     | 
| 
       29 
     | 
    
         
            -
              puppet_collection: puppet5
         
     | 
| 
       30 
     | 
    
         
            -
              vagrant_memsize: 256
         
     |