0.0
No commit activity in last 3 years
No release in over 3 years
Allows reading instance name, suite name and platform name in tests.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.8
~> 5.11
 Project Readme

inspec-tkinfo

InSpec plugin to retrieve Test Kitchen data as inputs.

Use Case

In some cases you want to get info about the Test Kitchen environment that your InSpec verifier is running in. This plugin offers some insight into instance name, platform name and suite name.

Installation

Simply execute inspec plugin install inspec-tkinfo, which will get the plugin from RubyGems and install/register it with InSpec.

You can verify successful installation via inspec plugin list

Usage

You have three input names available:

  • KITCHEN_INSTANCE_NAME ('default-amazon2')
  • KITCHEN_SUITE_NAME ('default')
  • KITCHEN_PLATFORM_NAME ('amazon2')

Use them in your InSpec tests like this:

instance_name = input('KITCHEN_INSTANCE_NAME')

describe file("/etc/#{instance_name}") do
  it { should exist }
end