Skip to content

Instantly share code, notes, and snippets.

@Staggerlee011
Created November 20, 2017 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Staggerlee011/9aae7e18cc3b2228eb1156dc9981ec87 to your computer and use it in GitHub Desktop.
Save Staggerlee011/9aae7e18cc3b2228eb1156dc9981ec87 to your computer and use it in GitHub Desktop.
Collection of Chef Test-Kitchen commands by example
## list kitchen test state
kitchen list
## creates vm based on kitchen.yml
kitchen create
## applies cookbook to vm
kitchen converge
## kitchen verify runs tests from folder:
kitchen verify
## test (destory -> create -> converge -> verify -> destory)
kitchen test
## rdp - if not specificing in driver_config then it uses azure/P2ssw0rd for login/password
kitchen login
## example calling the vm
kitchen exec -c '(Invoke-WebRequest -UseBasicParsing localhost).Content'
kitchen exec -c 'Get-Acl c:\inetpub\wwwroot\Default.htm | Format-List'
kitchen exec -c 'Get-DscLocalConfigurationManager | select -ExpandProperty "ConfigurationMode"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment