Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use profile files #184

Open
mmukherjee opened this issue May 17, 2018 · 0 comments
Open

Unable to use profile files #184

mmukherjee opened this issue May 17, 2018 · 0 comments
Labels
Triage: Needs Verify Type: Bug Doesn't work as expected.

Comments

@mmukherjee
Copy link

Hi,

I am having an inspec profile with 'profile files' and am trying to execute it using 'test kitchen'. I end up with this error -

$ kitchen verify
-----> Starting Kitchen (v1.13.2)
-----> Verifying <default-centos-nightly>...
       Using `blh/blah/path` for testing
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #verify action: [undefined local variable or method `inspec' for #<#<Class:0x007fd1e6c87f48>:0x007fd1e6c872c8>] on default-centos-nightly
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

The folder structure is like this -

image

the control - 'common.rb' is -

my_packages = yaml(content: inspec.profile.file('packages.yml')).params
my_packages.each do |s|
  describe package(s['package_name']) do
    it { should be_installed }
  end
end

The .kitchen.yml has this -

suites:
  - name: default
    run_list:
      - recipe[chef_base_server::default]
    verifier:
      inspec_tests:
        - test/integration/
    attributes:

What am I missing/where am I going wrong?

@zenspider zenspider added Triage: Needs Verify Type: Bug Doesn't work as expected. labels Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage: Needs Verify Type: Bug Doesn't work as expected.
Projects
None yet
Development

No branches or pull requests

2 participants