test-kitchen / kitchen-pester

A Test Kitchen driver to execute Pester as a verifier

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Required to define test_folder location in .kitchen.yml

davidmgrantham opened this issue · comments

I'm not sure if this is a OS X thing because my friends on windows didn't have this issue.

I had to actually define my exact path to my .ps1 for testing in the .kitchen.yml file.

verifier:
name: pester
test_folder: /Users/myname/chef-repo/cookbooks/recipe_name/integration

My .ps1 resides under integration/default/

Without the test_folder in .yml the kitchen verify could not find the folder to upload from.

-----> Starting Kitchen (v1.4.2)
D Berksfile found at /Users/myname/chef-repo/cookbooks/recipename/Berksfile, loading Berkshelf
D Berkshelf 4.0.1 library loaded
D Winrm Transport requested, loading WinRM::Transport gem (> 1.0)
D WinRM::Transport 1.0.3 library loaded
D Berksfile found at /Users/myname/chef-repo/cookbooks/recipename/Berksfile, loading Berkshelf
D Berkshelf 4.0.1 previously loaded
D Winrm Transport requested, loading WinRM::Transport gem (
> 1.0)
D WinRM::Transport 1.0.3 previously loaded
-----> Verifying ...
Preparing files for transfer
D Creating local sandbox in /var/folders/m3/b80j_wv132n5886ncqh937z4hdd025/T/default-Win2008R2-sandbox-20160202-9373-pw2x9c
Preparing to copy files from /Users/myname/chef-repo/cookbooks/recipename/test/integration/default to the SUT.
Transferring files to
D [WinRM] opening remote shell on plaintext::http://10.80.11.98:5985/wsman<{:disable_sspi=>true, :basic_auth_only=>true, :user=>"username", :pass=>"password"}>
D [WinRM] remote shell 73EFF5CF-4949-4789-B9F0-CC1A502EAB9E is open on plaintext::http://10.81.41.98:5985/wsman<{:disable_sspi=>true, :basic_auth_only=>true, :user=>"username", :pass=>"password"}>
D [FileTransporter] Running check_files.ps1
D [FileTransporter] @{
D [FileTransporter]
D [FileTransporter] }
D [FileTransporter] No remote files to decode, skipping
D [FileTransporter] Uploaded 0 items in (0m1.45s)
D Transfer complete
D Cleaning up local sandbox in /var/folders/m3/b80j_wv132n5886ncqh937z4hdd025/T/default-Win2008R2-sandbox-20160202-9373-pw2x9c
Finished verifying (0m2.39s).
-----> Kitchen is finished. (0m4.29s)
D [CommandExecutor] closing remote shell 73EFF5CF-4949-4789-B9F0-CC1A502EAB9E on plaintext::http://10.80.11.98:5985/wsman<{:disable_sspi=>true, :basic_auth_only=>true, :user=>"username", :pass=>"password"}>
D [CommandExecutor] remote shell 73EFF5CF-4949-4789-B9F0-CC1A502EAB9E closed

@davidmgrantham Thanks for reporting.. I'll try to replicate on my mac. Could you also provide a gist of the result of kitchen diagnose when you don't specify test_folder?

I think this might have been an oddity with winrm-transport and how recursive directory structures were formed. The latest builds of kitchen-pester should account for that.