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

Temp point to chef test kitchen ent #301

Draft
wants to merge 7 commits into
base: nm/inspec-version-upgrade
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
source "https://rubygems.org"
gemspec

gem "chef-test-kitchen-enterprise", git: "https://github.com/chef/chef-test-kitchen-enterprise", branch: "main"

group :guard do
gem "guard-rspec", require: nil
gem "guard-rubocop", require: nil
Expand Down
5 changes: 2 additions & 3 deletions kitchen-inspec.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ Gem::Specification.new do |spec|
spec.description = spec.summary
spec.homepage = "https://github.com/inspec/kitchen-inspec"

spec.files = `git ls-files -z`.split("\x0").grep(/LICENSE|^lib/)
spec.files = `git ls-files -z`.split("\x0").grep(/LICENSE|Gemfile|kitchen-inspec.gemspec|^lib/)
spec.require_paths = ["lib"]
spec.required_ruby_version = ">= 2.3.0"
spec.add_dependency "inspec", ">= 2.2.64", "< 7.0" # 2.2.64 is required for plugin v2 support & InSpec 6 included
spec.add_dependency "test-kitchen", ">= 2.7", "< 4" # 2.7 introduced no_parallel_for for verifiers
spec.add_dependency "inspec", "~> 6.0" # for RC1 release 6.0 and the above has the licensing changes.
spec.add_dependency "hashie", ">= 3.4", "<= 5.0"
end
9 changes: 7 additions & 2 deletions lib/kitchen/verifier/inspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,13 @@ def call(state)
def setup_chef_license_config(opts, config)
# Pass chef_license_key to inspec if it is set
# Pass chef_license_server to inspec if it is set
opts[:chef_license_key] = config[:chef_license_key] || ENV["CHEF_LICENSE_KEY"]
opts[:chef_license_server] = config[:chef_license_server] || ENV["CHEF_LICENSE_SERVER"]
p = instance.provisioner
opts[:chef_license_key] = config[:chef_license_key] ||
ENV["CHEF_LICENSE_KEY"] ||
(p.chef_license_key if p.respond_to?(:chef_license_key))
opts[:chef_license_server] = config[:chef_license_server] ||
ENV["CHEF_LICENSE_SERVER"] ||
(p.chef_license_server if p.respond_to?(:chef_license_server))
end

def setup_waivers(opts, config)
Expand Down