inspec / kitchen-inspec

Test-Kitchen Plugin for InSpec
Other
109 stars 58 forks source link

Waivers file is not used #290

Closed cmhe closed 2 years ago

cmhe commented 2 years ago

Version:

Environment:

I am using kitchen-puppet and kitchen-vagrant to deploy to a virtual box debian image

Scenario:

Specify a waivers file to be used in the inspec execution, in order to skip some inspec controls.

Steps to Reproduce:

Used kitchen.yml:

provisioner:
  name: puppet_apply
  ignore_spec_fixtures: true
  manifest_path: manifests
  manifest: local.pp
  modules_path: modules
  hiera_data_path: data
  hiera_deep_merge: true
  puppetfile_path: Puppetfile
  require_chef_for_busser: false
  hiera_config_path: "hiera-testing.yaml"
  ignored_paths_from_root:
    - spec
    - vendor

platforms:
  - name: debian-11-puppet7-vagrant
    driver_plugin: vagrant
    driver:
      box: generic/debian11
      provider: virtualbox
      vm_hostname: vagrant-test
    provisioner:
      puppet_apt_repo: https://apt.puppetlabs.com/puppetlabs-release-focal.deb
      puppet_apt_collections_repo: http://apt.puppetlabs.com/puppet7-release-focal.deb

transport:
  name: sftp

verifier:
  name: inspec
  reporter:
    - cli

suites:
  - name: default
    verifier:
      waivers:
        - test/integration/waivers.yml
      load_plugins: false

Used inspec control (test/integration/default/controls/test.rb):

control 'failing-test' do
  title 'A failing inspec control'
  desc 'A failing inspec control'
  impact 1.0

  variable = 'false'
  describe variable do
    it { should cmp 'true' }
  end
end

control 'successful-test' do
  title 'A successful inspec control'
  desc 'A successful inspec control'
  impact 1.0

  variable = 'true'
  describe variable do
    it { should cmp 'true' }
  end
end

Used waivers file (test/integration/waivers.yml):

failing-test:
  justification: "expected to fail'
  run: false

Expected Result:

A kitchen test run to finish successful.

Actual Result:

kitchen test run fails because the control was not skipped:

$ bundle exec kitchen test -l debug
-----> Starting Test Kitchen (v3.2.2)
D      [Vagrant command] BEGIN (vagrant --version)
D      [Vagrant command] END (0m0.14s)
D      Puppetfile found at Puppetfile, loading Librarian-Puppet
D      Librarian-Puppet 3.0.1 library loaded
-----> Cleaning up any prior instances of <default-debian-11-puppet7-vagrant>
-----> Destroying <default-debian-11-puppet7-vagrant>...
D      <default-debian-11-puppet7-vagrant> is synchronizing on Kitchen::Driver::Vagrant#destroy
D      <default-debian-11-puppet7-vagrant> is messaging Kitchen::Driver::Vagrant#destroy
D      Creating Vagrantfile for <default-debian-11-puppet7-vagrant> (/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/Vagrantfile)
D      ------------
D      Vagrant.configure("2") do |c|
D        c.berkshelf.enabled = false if Vagrant.has_plugin?("vagrant-berkshelf")
D        c.vm.box = "generic/debian11"
D        c.vm.hostname = "vagrant-test"
D        c.vm.synced_folder ".", "/vagrant", disabled: true
D        c.vm.provider :virtualbox do |p|
D          p.name = "kitchen-puppet-kitchen-inspec-bug-default-debian-11-puppet7-vagrant-276df5c3-be9e-4641-b908-1bfda6be1c0f"
D          p.customize ["modifyvm", :id, "--audio", "none"]
D        end
D      end
D      ------------
D      [Vagrant command] BEGIN (vagrant destroy -f)
       ==> default: This machine used to live in .../default-debian-11-puppet7-vagrant but it's now at /tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant.
       ==> default: Depending on your current provider you may need to change the name of
       ==> default: the machine to run it as a different machine.
       ==> default: Forcing shutdown of VM...
       ==> default: Destroying VM and associated drives...
D      [Vagrant command] END (0m4.69s)
       Vagrant instance <default-debian-11-puppet7-vagrant> destroyed.
       Finished destroying <default-debian-11-puppet7-vagrant> (0m4.82s).
-----> Testing <default-debian-11-puppet7-vagrant>
-----> Creating <default-debian-11-puppet7-vagrant>...
D      <default-debian-11-puppet7-vagrant> is synchronizing on Kitchen::Driver::Vagrant#create
D      <default-debian-11-puppet7-vagrant> is messaging Kitchen::Driver::Vagrant#create
D      Creating Vagrantfile for <default-debian-11-puppet7-vagrant> (/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/Vagrantfile)
D      ------------
D      Vagrant.configure("2") do |c|
D        c.berkshelf.enabled = false if Vagrant.has_plugin?("vagrant-berkshelf")
D        c.vm.box = "generic/debian11"
D        c.vm.hostname = "vagrant-test"
D        c.vm.synced_folder ".", "/vagrant", disabled: true
D        c.vm.provider :virtualbox do |p|
D          p.name = "kitchen-puppet-kitchen-inspec-bug-default-debian-11-puppet7-vagrant-de447dbf-90e1-40f4-88cf-ee3acf54301a"
D          p.customize ["modifyvm", :id, "--audio", "none"]
D        end
D      end
D      ------------
D      [Vagrant command] BEGIN (vagrant up --no-provision --provider virtualbox)
       Bringing machine 'default' up with 'virtualbox' provider...
       ==> default: Importing base box 'generic/debian11'...
==> default: Matching MAC address for NAT networking...
       ==> default: Checking if box 'generic/debian11' version '3.6.14' is up to date...
       ==> default: Setting the name of the VM: kitchen-puppet-kitchen-inspec-bug-default-debian-11-puppet7-vagrant-de447dbf-90e1-40f4-88cf-ee3acf54301a
       ==> default: Fixed port collision for 22 => 2222. Now on port 2200.
       ==> default: Clearing any previously set network interfaces...
       ==> default: Preparing network interfaces based on configuration...
           default: Adapter 1: nat
       ==> default: Forwarding ports...
           default: 22 (guest) => 2200 (host) (adapter 1)
       ==> default: Running 'pre-boot' VM customizations...
       ==> default: Booting VM...
       ==> default: Waiting for machine to boot. This may take a few minutes...
           default: SSH address: 127.0.0.1:2200
           default: SSH username: vagrant
           default: SSH auth method: private key
           default:
           default: Vagrant insecure key detected. Vagrant will automatically replace
           default: this with a newly generated keypair for better security.
           default:
           default: Inserting generated public key within guest...
           default: Removing insecure key from the guest if it's present...
           default: Key inserted! Disconnecting and reconnecting using new SSH key...
       ==> default: Machine booted and ready!
       ==> default: Checking for guest additions in VM...
       ==> default: Setting hostname...
       ==> default: Machine not provisioned because `--no-provision` is specified.
D      [Vagrant command] END (0m54.83s)
D      [Vagrant command] BEGIN (vagrant ssh-config)
D      [Vagrant command] END (0m1.80s)
D      [SSH] shutting previous connection vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>[".../.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never}>
D      [SSH] opening connection to vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never}>
D      [SSH] vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x00007f03d0153e90 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f03d0153e68 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007f03d0153e18 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00007f03d0153df0>, @mon_data_owner_object_id=8440>>, :password_prompt=>#<Net::SSH::Prompt:0x00007f03d0153da0>, :user=>"vagrant"}> (echo '[SSH] Established')
       [SSH] Established
       Vagrant instance <default-debian-11-puppet7-vagrant> created.
       Finished creating <default-debian-11-puppet7-vagrant> (0m57.86s).
-----> Converging <default-debian-11-puppet7-vagrant>...
       Preparing files for transfer
D      Creating local sandbox in /tmp/user/1000/default-debian-11-puppet7-vagrant-sandbox-20220518-3416148-e6b65n
D      Creating local sandbox in /tmp/user/1000/default-debian-11-puppet7-vagrant-sandbox-20220518-3416148-e6b65n
       Preparing modules
       Resolving module dependencies with Librarian-Puppet 3.0.1...
D      Using Puppetfile from Puppetfile
D      [Librarian] Pre-Cached Sources:
D      [Librarian] Post-Cached Sources:
D      [Librarian]   [:forge, "https://forgeapi.puppetlabs.com", {}]
D      [Librarian] The specfile is unchanged: nothing to do.
D      Copying modules to directory: /tmp/user/1000/default-debian-11-puppet7-vagrant-sandbox-20220518-3416148-e6b65n/modules
D      Copying module kitchen_inspec_test from ....
       Preparing manifests
D      Using manifests from /tmp/puppet-kitchen-inspec-bug/manifests
       Preparing files
       nothing to do for files
       Preparing hiera (global layer)
D      Using hiera from hiera-testing.yaml
       Preparing hiera data
D      Copying hiera data from data to /tmp/user/1000/default-debian-11-puppet7-vagrant-sandbox-20220518-3416148-e6b65n/hiera
       Finished Preparing files for transfer
D      [SSH] reusing existing connection vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x00007f03d0153e90 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f03d0153e68 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007f03d0153e18 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00007f03d0153df0>, @mon_data_owner_object_id=8440>>, :password_prompt=>#<Net::SSH::Prompt:0x00007f03d0153da0>, :user=>"vagrant"}>
       Installing Puppet Collections on debian
D      [SSH] vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x00007f03d0153e90 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f03d0153e68 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007f03d0153e18 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00007f03d0153df0>, @mon_data_owner_object_id=8440>>, :password_prompt=>#<Net::SSH::Prompt:0x00007f03d0153da0>, :user=>"vagrant"}> (
          # Check whether a command exists - returns 0 if it does, 1 if it does not
exists() {
  if command -v $1 >/dev/null 2>&1
  then
    return 0
  else
    return 1
  fi
}

# do_wget URL FILENAME
do_wget() {
  echo "trying wget..."
  wget -O "$2" "$1" 2>/tmp/stderr
  # check for bad return status
  test $? -ne 0 && return 1
  # check for 404 or empty file
  grep "ERROR 404" /tmp/stderr 2>&1 >/dev/null
  if test $? -eq 0 || test ! -s "$2"; then
    return 1
  fi
  return 0
}

# do_curl URL FILENAME
do_curl() {
  echo "trying curl..."
  curl -L "$1" > "$2"
  # check for bad return status
  [ $? -ne 0 ] && return 1
  # check for bad output or empty file
  grep "The specified key does not exist." "$2" 2>&1 >/dev/null
  if test $? -eq 0 || test ! -s "$2"; then
    return 1
  fi
  return 0
}

# do_fetch URL FILENAME
do_fetch() {
  echo "trying fetch..."
  fetch -o "$2" "$1" 2>/tmp/stderr
  # check for bad return status
  test $? -ne 0 && return 1
  return 0
}

# do_perl URL FILENAME
do_perl() {
  echo "trying perl..."
  perl -e "use LWP::Simple; getprint($ARGV[0]);" "$1" > "$2"
  # check for bad return status
  test $? -ne 0 && return 1
  # check for bad output or empty file
  # grep "The specified key does not exist." "$2" 2>&1 >/dev/null
  # if test $? -eq 0 || test ! -s "$2"; then
  #   unable_to_retrieve_package
  # fi
  return 0
}

# do_python URL FILENAME
do_python() {
  echo "trying python..."
  python -c "import sys,urllib2 ; sys.stdout.write(urllib2.urlopen(sys.argv[1]).read())" "$1" > "$2"
  # check for bad return status
  test $? -ne 0 && return 1
  # check for bad output or empty file
  #grep "The specified key does not exist." "$2" 2>&1 >/dev/null
  #if test $? -eq 0 || test ! -s "$2"; then
  #  unable_to_retrieve_package
  #fi
  return 0
}

# do_download URL FILENAME
do_download() {
  PATH=/opt/local/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  export PATH

  echo "downloading $1"
  echo "  to file $2"

  # we try all of these until we get success.
  # perl, in particular may be present but LWP::Simple may not be installed

  if exists wget; then
    do_wget $1 $2 && return 0
  fi

  if exists curl; then
    do_curl $1 $2 && return 0
  fi

  if exists fetch; then
    do_fetch $1 $2 && return 0
  fi

  if exists perl; then
    do_perl $1 $2 && return 0
  fi

  if exists python; then
    do_python $1 $2 && return 0
  fi

  echo ">>>>>> wget, curl, fetch, perl or python not found on this instance."
  return 16
}

          if [ ! -d "/opt/puppetlabs" ]; then
            if [ ! -f "http://apt.puppetlabs.com/puppet7-release-focal.deb" ]; then
              sudo -E apt-get -y install wget
              sudo -E wget  http://apt.puppetlabs.com/puppet7-release-focal.deb
            fi
            sudo -E dpkg -i puppet7-release-focal.deb
            sudo -E apt-get update
            sudo -E apt-get -y install puppet-agent
          fi

                    # Support for hash merge lookups to recursively merge hash keys
          if [[ $(sudo -E gem list deep_merge -i) == 'false' ]]; then
            echo '-----> Installing deep_merge to provide deep_merge of hiera hashes'
            sudo -E gem install  --no-ri --no-rdoc deep_merge
          fi

)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
       wget is already the newest version (1.21-1+deb11u1).
       0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
       --2022-05-18 09:12:48--  http://apt.puppetlabs.com/puppet7-release-focal.deb
       Resolving apt.puppetlabs.com (apt.puppetlabs.com)... 108.138.36.18, 108.138.36.67, 108.138.36.70, ...
       Connecting to apt.puppetlabs.com (apt.puppetlabs.com)|108.138.36.18|:80... connected.
       HTTP request sent, awaiting response... 200 OK
       Length: 11748 (11K) [application/x-debian-package]
       Saving to: 'puppet7-release-focal.deb'

puppet7-release-foc 100%[===================>]  11.47K  --.-KB/s    in 0.002s

       2022-05-18 09:12:49 (4.88 MB/s) - 'puppet7-release-focal.deb' saved [11748/11748]

       Selecting previously unselected package puppet7-release.
(Reading database ... 64047 files and directories currently installed.)
       Preparing to unpack puppet7-release-focal.deb ...
       Unpacking puppet7-release (7.0.0-2focal) ...
       Setting up puppet7-release (7.0.0-2focal) ...
Hit:1 http://deb.debian.org/debian bullseye InRelease
Get:2 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
Get:4 http://apt.puppetlabs.com focal InRelease [99.2 kB]
Get:5 http://security.debian.org/debian-security bullseye-security/main Sources [121 kB]
Get:6 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [146 kB]
Get:7 http://security.debian.org/debian-security bullseye-security/main Translation-en [90.3 kB]
Get:8 http://apt.puppetlabs.com focal/puppet7 amd64 Packages [23.1 kB]
Get:9 http://apt.puppetlabs.com focal/puppet7 all Packages [11.2 kB]
Fetched 574 kB in 1s (404 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
       The following NEW packages will be installed:
         puppet-agent
       0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
       Need to get 20.3 MB of archives.
       After this operation, 131 MB of additional disk space will be used.
Get:1 http://apt.puppetlabs.com focal/puppet7 amd64 puppet-agent amd64 7.16.0-1focal [20.3 MB]
Fetched 20.3 MB in 5s (4473 kB/s)
       apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
       perl: warning: Setting locale failed.
       perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_TIME = "en_SE.UTF-8",
        LANG = "en_US.UTF-8"
           are supported and installed on your system.
       perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
       locale: Cannot set LC_ALL to default locale: No such file or directory
       Selecting previously unselected package puppet-agent.
(Reading database ... 64052 files and directories currently installed.)
       Preparing to unpack .../puppet-agent_7.16.0-1focal_amd64.deb ...
       Unpacking puppet-agent (7.16.0-1focal) ...
       Setting up puppet-agent (7.16.0-1focal) ...
       Created symlink /etc/systemd/system/multi-user.target.wants/pxp-agent.service → /lib/systemd/system/pxp-agent.service.
       Created symlink /etc/systemd/system/multi-user.target.wants/puppet.service → /lib/systemd/system/puppet.service.
       Removed /etc/systemd/system/multi-user.target.wants/pxp-agent.service.
       Processing triggers for libc-bin (2.31-13+deb11u3) ...
       sudo: gem: command not found
D      sudo -E rm -rf /tmp/kitchen/modules /tmp/kitchen/manifests /tmp/kitchen/files /tmp/kitchen/hiera /tmp/kitchen/hiera.yaml /tmp/kitchen/hiera.global.yaml /tmp/kitchen/facter /tmp/kitchen/spec /tmp/kitchen/enc /tmp/kitchen/environment /etc/puppetlabs/code/environments/production/hieradata /etc/hiera.yaml /etc/puppetlabs/puppet/hiera.yaml /etc/puppet/spec /etc/puppetlabs/puppet/fileserver.conf; mkdir -p /tmp/kitchen; sudo -E mkdir -p /etc/puppetlabs/puppet
D      [SSH] vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x00007f03d0153e90 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f03d0153e68 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007f03d0153e18 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00007f03d0153df0>, @mon_data_owner_object_id=8440>>, :password_prompt=>#<Net::SSH::Prompt:0x00007f03d0153da0>, :user=>"vagrant"}> (sudo -E rm -rf /tmp/kitchen/modules /tmp/kitchen/manifests /tmp/kitchen/files /tmp/kitchen/hiera /tmp/kitchen/hiera.yaml /tmp/kitchen/hiera.global.yaml /tmp/kitchen/facter /tmp/kitchen/spec /tmp/kitchen/enc /tmp/kitchen/environment /etc/puppetlabs/code/environments/production/hieradata /etc/hiera.yaml /etc/puppetlabs/puppet/hiera.yaml /etc/puppet/spec /etc/puppetlabs/puppet/fileserver.conf; mkdir -p /tmp/kitchen; sudo -E mkdir -p /etc/puppetlabs/puppet)
       Transferring files to <default-debian-11-puppet7-vagrant>
D      [SFTP] Fast path upload from /tmp/user/1000/default-debian-11-puppet7-vagrant-sandbox-20220518-3416148-e6b65n/manifests to /tmp/kitchen/manifests
       [SFTP] Time taken to upload /tmp/user/1000/default-debian-11-puppet7-vagrant-sandbox-20220518-3416148-e6b65n/manifests to vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x00007f03d0153e90 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f03d0153e68 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007f03d0153e18 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00007f03d0153df0>, @mon_data_owner_object_id=8440>>, :password_prompt=>#<Net::SSH::Prompt:0x00007f03d0153da0>, :user=>"vagrant"}>:/tmp/kitchen/manifests: 0.03 sec
D      [SFTP] Fast path upload from /tmp/user/1000/default-debian-11-puppet7-vagrant-sandbox-20220518-3416148-e6b65n/hiera to /tmp/kitchen/hiera
       [SFTP] Time taken to upload /tmp/user/1000/default-debian-11-puppet7-vagrant-sandbox-20220518-3416148-e6b65n/hiera to vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x00007f03d0153e90 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f03d0153e68 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007f03d0153e18 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00007f03d0153df0>, @mon_data_owner_object_id=8440>>, :password_prompt=>#<Net::SSH::Prompt:0x00007f03d0153da0>, :user=>"vagrant"}>:/tmp/kitchen/hiera: 0.01 sec
D      [SFTP] Fast path upload from /tmp/user/1000/default-debian-11-puppet7-vagrant-sandbox-20220518-3416148-e6b65n/hiera.global.yaml to /tmp/kitchen/hiera.global.yaml
       [SFTP] Time taken to upload /tmp/user/1000/default-debian-11-puppet7-vagrant-sandbox-20220518-3416148-e6b65n/hiera.global.yaml to vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x00007f03d0153e90 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f03d0153e68 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007f03d0153e18 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00007f03d0153df0>, @mon_data_owner_object_id=8440>>, :password_prompt=>#<Net::SSH::Prompt:0x00007f03d0153da0>, :user=>"vagrant"}>:/tmp/kitchen/hiera.global.yaml: 0.00 sec
D      [SFTP] Fast path upload from /tmp/user/1000/default-debian-11-puppet7-vagrant-sandbox-20220518-3416148-e6b65n/modules to /tmp/kitchen/modules
       [SFTP] Time taken to upload /tmp/user/1000/default-debian-11-puppet7-vagrant-sandbox-20220518-3416148-e6b65n/modules to vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x00007f03d0153e90 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f03d0153e68 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007f03d0153e18 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00007f03d0153df0>, @mon_data_owner_object_id=8440>>, :password_prompt=>#<Net::SSH::Prompt:0x00007f03d0153da0>, :user=>"vagrant"}>:/tmp/kitchen/modules: 0.06 sec
D      Transfer complete
D      sudo -E mkdir -p /etc/puppetlabs/code/environments/production/hieradata && sudo -E cp -r /tmp/kitchen/hiera/* /etc/puppetlabs/code/environments/production/hieradata
D      [SSH] vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x00007f03d0153e90 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f03d0153e68 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007f03d0153e18 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00007f03d0153df0>, @mon_data_owner_object_id=8440>>, :password_prompt=>#<Net::SSH::Prompt:0x00007f03d0153da0>, :user=>"vagrant"}> (sudo -E mkdir -p /etc/puppetlabs/code/environments/production/hieradata && sudo -E cp -r /tmp/kitchen/hiera/* /etc/puppetlabs/code/environments/production/hieradata)
       Going to invoke puppet apply with:

             sudo -E /opt/puppetlabs/bin/puppet apply /tmp/kitchen/manifests/local.pp --modulepath=/tmp/kitchen/modules --fileserverconfig=/tmp/kitchen/fileserver.conf     --hiera_config=/tmp/kitchen/hiera.global.yaml

D      Attempting to execute command - try 1 of 1.
D      [SSH] vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x00007f03d0153e90 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f03d0153e68 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007f03d0153e18 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00007f03d0153df0>, @mon_data_owner_object_id=8440>>, :password_prompt=>#<Net::SSH::Prompt:0x00007f03d0153da0>, :user=>"vagrant"}> (

             sudo -E /opt/puppetlabs/bin/puppet apply /tmp/kitchen/manifests/local.pp --modulepath=/tmp/kitchen/modules --fileserverconfig=/tmp/kitchen/fileserver.conf     --hiera_config=/tmp/kitchen/hiera.global.yaml
)
       Notice: Compiled catalog for vagrant-test.lan in environment production in 0.02 seconds
       Notice: Applied catalog in 0.01 seconds
       Downloading files from <default-debian-11-puppet7-vagrant>
D      Download complete
D      Cleaning up local sandbox in /tmp/user/1000/default-debian-11-puppet7-vagrant-sandbox-20220518-3416148-e6b65n
       Finished converging <default-debian-11-puppet7-vagrant> (0m19.06s).
-----> Setting up <default-debian-11-puppet7-vagrant>...
       Finished setting up <default-debian-11-puppet7-vagrant> (0m0.00s).
-----> Verifying <default-debian-11-puppet7-vagrant>...
D      <default-debian-11-puppet7-vagrant> is synchronizing on Kitchen::Verifier::Inspec#verify
D      <default-debian-11-puppet7-vagrant> is messaging Kitchen::Verifier::Inspec#verify
D      Initialize InSpec
D      Options {"backend"=>"ssh", "logger"=>#<Kitchen::Logger:0x000056254ba3e910 @log_overwrite=true, @loggers=[#<Kitchen::Logger::LogdevLogger:0x000056254ba3e5a0 @level=0, @progname="default-debian-11-puppet7-vagrant", @default_formatter=#<Logger::Formatter:0x000056254ba3e578 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000056254ba3e410 @shift_period_suffix="%Y%m%d", @shift_size=1048576, @shift_age=0, @filename="/tmp/puppet-kitchen-inspec-bug/.kitchen/logs/default-debian-11-puppet7-vagrant.log", @dev=#<File:/tmp/puppet-kitchen-inspec-bug/.kitchen/logs/default-debian-11-puppet7-vagrant.log>, @binmode=false, @mon_data=#<Monitor:0x000056254ba3e3e8>, @mon_data_owner_object_id=7480>, @buffer="">, #<Kitchen::Logger::StdoutLogger:0x000056254ba3e190 @level=0, @progname="default-debian-11-puppet7-vagrant", @default_formatter=#<Logger::Formatter:0x000056254ba3e140 @datetime_format=nil>, @formatter=#<Proc:0x000056254ba3df60 /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/logger.rb:295>, @logdev=#<Logger::LogDevice:0x000056254ba3e0a0 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000056254ba3e078>, @mon_data_owner_object_id=7500>, @buffer="">], @logdev=#<Kitchen::Logger::LogdevLogger:0x000056254ba3e5a0 @level=0, @progname="default-debian-11-puppet7-vagrant", @default_formatter=#<Logger::Formatter:0x000056254ba3e578 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000056254ba3e410 @shift_period_suffix="%Y%m%d", @shift_size=1048576, @shift_age=0, @filename="/tmp/puppet-kitchen-inspec-bug/.kitchen/logs/default-debian-11-puppet7-vagrant.log", @dev=#<File:/tmp/puppet-kitchen-inspec-bug/.kitchen/logs/default-debian-11-puppet7-vagrant.log>, @binmode=false, @mon_data=#<Monitor:0x000056254ba3e3e8>, @mon_data_owner_object_id=7480>, @buffer="">>, "sudo"=>true, "sudo_command"=>"sudo -E", "sudo_options"=>nil, "host"=>"127.0.0.1", "port"=>"2200", "user"=>"vagrant", "keepalive"=>true, "keepalive_interval"=>60, "connection_timeout"=>15, "connection_retries"=>5, "connection_retry_sleep"=>1, "max_wait_until_ready"=>600, "compression"=>false, "compression_level"=>0, "bastion_port"=>22, "key_files"=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], "color"=>true, "reporter"=>["cli"], :controls=>nil, :backend_cache=>true}
D      [SSH] opening connection to vagrant@127.0.0.1
D      [SSH] using options {:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>15, :auth_methods=>["none", "publickey"], :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :password=>"<hidden>", :forward_agent=>false, :non_interactive=>false, :append_all_supported_algorithms=>true, :config=>true, :verify_host_key=>:never}
D      [SSH] vagrant@127.0.0.1 cmd = cmd.exe /c ver
D      [SSH] vagrant@127.0.0.1 cmd = Get-WmiObject Win32_OperatingSystem | Select Caption,Version | ConvertTo-Json
D      [SSH] vagrant@127.0.0.1 cmd = uname -s
D      [SSH] vagrant@127.0.0.1 cmd = uname -m
D      [SSH] vagrant@127.0.0.1 cmd = test -f /etc/debian_version
D      [SSH] vagrant@127.0.0.1 cmd = test -f /etc/lsb-release && cat /etc/lsb-release
D      [SSH] vagrant@127.0.0.1 cmd = test -f /usr/bin/lsb-release && cat /usr/bin/lsb-release
D      [SSH] vagrant@127.0.0.1 cmd = test -f /etc/os-release && cat /etc/os-release
D      [SSH] vagrant@127.0.0.1 cmd = test -f /usr/bin/raspi-config
D      [SSH] vagrant@127.0.0.1 cmd = test -f /etc/debian_version && cat /etc/debian_version
D      [SSH] vagrant@127.0.0.1 cmd = sh -c '(sudo -E echo) < /dev/null'
[2022-05-18T11:13:08+02:00] DEBUG: Option backend_cache is enabled
[2022-05-18T11:13:08+02:00] DEBUG: Resolve {:path=>"/tmp/puppet-kitchen-inspec-bug/test/integration/default"} into cache /home/ch/.inspec/cache
[2022-05-18T11:13:08+02:00] DEBUG: Dependency does not exist in the cache {:path=>"/tmp/puppet-kitchen-inspec-bug/test/integration/default"}
       Loaded kitchen-inspec-test
[2022-05-18T11:13:08+02:00] DEBUG: Starting run with targets: ["Inspec::Profile<kitchen-inspec-test>"]
[2022-05-18T11:13:08+02:00] DEBUG: Loading /tmp/puppet-kitchen-inspec-bug/test/integration/default/controls/test.rb into #<Inspec::ProfileContext:0x00007f03d065b5c8>
[2022-05-18T11:13:08+02:00] DEBUG: Registering rule failing-test
[2022-05-18T11:13:08+02:00] DEBUG: Registering rule successful-test

Profile: A kitchen-inspec testcase (kitchen-inspec-test)
Version: 0.1.0
Target:  ssh://vagrant@127.0.0.1:2200

  ×  failing-test: A failing inspec control
     ×  false is expected to cmp == "true"

     expected: true
          got: false

     (compared using `cmp` matcher)

  ✔  successful-test: A successful inspec control
     ✔  true is expected to cmp == "true"

Profile Summary: 1 successful control, 1 control failure, 0 controls skipped
Test Summary: 1 successful, 1 failure, 0 skipped
D      [SSH] shutting previous connection vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x00007f03d0153e90 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f03d0153e68 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007f03d0153e18 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00007f03d0153df0>, @mon_data_owner_object_id=8440>>, :password_prompt=>#<Net::SSH::Prompt:0x00007f03d0153da0>, :user=>"vagrant"}>
D      [SFTP] closing connection to vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x00007f03d0153e90 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f03d0153e68 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007f03d0153e18 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00007f03d0153df0>, @mon_data_owner_object_id=8440>>, :password_prompt=>#<Net::SSH::Prompt:0x00007f03d0153da0>, :user=>"vagrant"}>
D      [SSH] closing connection to vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :keepalive_maxcount=>3, :timeout=>15, :keys_only=>true, :keys=>["/tmp/puppet-kitchen-inspec-bug/.kitchen/kitchen-vagrant/default-debian-11-puppet7-vagrant/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :verify_host_key=>:never, :logger=>#<Logger:0x00007f03d0153e90 @level=4, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f03d0153e68 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007f03d0153e18 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x00007f03d0153df0>, @mon_data_owner_object_id=8440>>, :password_prompt=>#<Net::SSH::Prompt:0x00007f03d0153da0>, :user=>"vagrant"}>
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Verify failed on instance <default-debian-11-puppet7-vagrant>.  Please see .kitchen/logs/default-debian-11-puppet7-vagrant.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

D      ------Exception-------
D      Class: Kitchen::ActionFailed
D      Message: 1 actions failed.
>>>>>>     Verify failed on instance <default-debian-11-puppet7-vagrant>.  Please see .kitchen/logs/default-debian-11-puppet7-vagrant.log for more details
D      ----------------------
D      ------Backtrace-------
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:181:in `report_errors'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:172:in `run_action'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/command/test.rb:41:in `block in call'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/2.7.0/benchmark.rb:293:in `measure'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/command/test.rb:37:in `call'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/cli.rb:52:in `perform'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/cli.rb:250:in `test'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/bin/kitchen:11:in `block in <top (required)>'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/errors.rb:183:in `with_friendly_errors'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/bin/kitchen:11:in `<top (required)>'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/bin/kitchen:23:in `load'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/bin/kitchen:23:in `<top (required)>'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `load'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `kernel_load'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:23:in `run'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli.rb:483:in `exec'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli.rb:31:in `dispatch'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli.rb:25:in `start'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/exe/bundle:48:in `block in <top (required)>'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/exe/bundle:36:in `<top (required)>'
D      /home/ch/.rbenv/versions/2.7.6/bin/bundle:23:in `load'
D      /home/ch/.rbenv/versions/2.7.6/bin/bundle:23:in `<main>'
D      ----End Backtrace-----
D      -Composite Exception--
D      Class: Kitchen::InstanceFailure
D      Message: Verify failed on instance <default-debian-11-puppet7-vagrant>.  Please see .kitchen/logs/default-debian-11-puppet7-vagrant.log for more details
D      ----------------------
D      ------Backtrace-------
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/kitchen-inspec-2.5.2/lib/kitchen/verifier/inspec.rb:113:in `call'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:469:in `block in verify_action'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:560:in `block in synchronize_or_call'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:558:in `synchronize'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:558:in `synchronize_or_call'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:524:in `block in action'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/2.7.0/benchmark.rb:293:in `measure'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:523:in `action'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:461:in `verify_action'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:392:in `block (2 levels) in transition_to'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/lifecycle_hooks.rb:47:in `run_with_hooks'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:391:in `block in transition_to'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:390:in `each'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:390:in `transition_to'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:161:in `verify'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:190:in `block in test'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/2.7.0/benchmark.rb:293:in `measure'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:186:in `test'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:195:in `public_send'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:195:in `run_action_in_thread'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:166:in `block (2 levels) in run_action'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
D      ----End Backtrace-----
D      ---Nested Exception---
D      Class: Kitchen::ActionFailed
D      Message: InSpec Runner returns 1
D      ----------------------
D      ------Backtrace-------
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/kitchen-inspec-2.5.2/lib/kitchen/verifier/inspec.rb:113:in `call'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:469:in `block in verify_action'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:560:in `block in synchronize_or_call'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:558:in `synchronize'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:558:in `synchronize_or_call'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:524:in `block in action'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/2.7.0/benchmark.rb:293:in `measure'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:523:in `action'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:461:in `verify_action'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:392:in `block (2 levels) in transition_to'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/lifecycle_hooks.rb:47:in `run_with_hooks'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:391:in `block in transition_to'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:390:in `each'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:390:in `transition_to'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:161:in `verify'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:190:in `block in test'
D      /home/ch/.rbenv/versions/2.7.6/lib/ruby/2.7.0/benchmark.rb:293:in `measure'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/instance.rb:186:in `test'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:195:in `public_send'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:195:in `run_action_in_thread'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/test-kitchen-3.2.2/lib/kitchen/command.rb:166:in `block (2 levels) in run_action'
D      /tmp/puppet-kitchen-inspec-bug/vendor/bundle/ruby/2.7.0/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
D      ----End Backtrace-----
max-wittig commented 2 years ago

@clintoncwolfe any ideas?

/cc @dlouzan

clintoncwolfe commented 2 years ago

I've reproduced the problem with Debian 11 virtualbox/vagrant, chef_solo with an empty runlist, kitchen_inspec 2.5.2, test-kitchen 3.2.2. Occurs with InSpec 4.24.32 (yours) and 4.56.20 (latest 4-series).

I'm looking into it.

clintoncwolfe commented 2 years ago

Other than one docs commit to the README in February (https://github.com/inspec/kitchen-inspec/commit/c66a3955b3240a6e7cb71d19bf11df6ba1b157d3), I see no evidence that waivers functionality was ever implemented in kitchen-inspec.

clintoncwolfe commented 2 years ago

Because This Has Never Worked, I'm going to take the liberty of renaming the config key to be "waiver_files" for consistency with the Chef Infra attribute and the InSpec CLI, and the other existing options.