Using test kitchen - busser for validating puppet rspec

I have puppet module in place with unit tests written for it as below for eg.


require 'spec_helper'

describe 'ec2_services' do

it { contain_file('/usr/bin/')
  .with('path'   => '/usr/bin/')
  .with('ensure' => 'present')
  .with('owner'  => 'root')
  .with('group'  => 'root')
  .with('mode'   => '0755')
  .with('source' => 'puppet:///modules/ec2_services/')

it { contain_service('wait-for-userdata')
  .with('enable'   => 'false')
  .with('provider' => 'systemd')


I use pdk (puppet development kit) to run unit tests which verifies tests against puppet code

pdk test unit

So far all works well :slight_smile:

I was thinking to somehow make use of above same test and validate the system (Integration testing)
so was trying to setup and use kitchen verify but it was not working properly with busser/serverspec in kitchen.yml

kitchen verify
-----> Starting Test Kitchen (v3.0.0)

-----> Verifying <default-aws>...
       Preparing files for transfer

-----> Busser installation detected (busser)

-----> Busser plugin detected: busser-serverspec
       Removing /tmp/verifier/suites/serverspec
       Transferring files to <default-aws>
-----> Running serverspec test suite
       /opt/chef/embedded/bin/ruby -I/tmp/verifier/suites/serverspec -I/tmp/verifier/gems/gems/rspec-support-3.10.2/lib:/tmp/verifier/gems/gems/rspec-core-3.10.1/lib /opt/chef/embedded/bin/rspec --pattern /tmp/verifier/suites/serverspec/\*\*/\*_spec.rb --color --format documentation --default-path /tmp/verifier/suites/serverspec
       An error occurred while loading /tmp/verifier/suites/serverspec/ec2_services_spec.rb.
       Failure/Error: Unable to find <internal:/opt/chef/embedded/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb> to read failed line
         cannot load such file -- puppet-catalog_rspec
       # /tmp/verifier/suites/serverspec/spec_helper.rb:3:in `<top (required)>'
       # /tmp/verifier/suites/serverspec/ec2_services_spec.rb:3:in `<top (required)>'
       No examples found.
       Finished in 0.00006 seconds (files took 0.09762 seconds to load)
       0 examples, 0 failures, 1 error occurred outside of examples
       /opt/chef/embedded/bin/ruby -I/tmp/verifier/suites/serverspec -I/tmp/verifier/gems/gems/rspec-support-3.10.2/lib:/tmp/verifier/gems/gems/rspec-core-3.10.1/lib /opt/chef/embedded/bin/rspec --pattern /tmp/verifier/suites/serverspec/\*\*/\*_spec.rb --color --format documentation --default-path /tmp/verifier/suites/serverspec failed
       !!!!!! Ruby Script [/tmp/verifier/gems/gems/busser-serverspec-0.5.10/lib/busser/runner_plugin/../serverspec/runner.rb /tmp/verifier/suites/serverspec] exit code was 1
>>>>>> ------Exception-------

I have very limited understanding with this, so my question is:

Can the above written unit tests(I assume it is rspec) be used to validate the system for e.g service running? using any tools for eg. kitchen?

Or I don't have any options other than writing separate tests outside puppet (inspec) and run with kitchen, I have tested and it works but wanted to make use of existing written tests,