Closed gsreynolds closed 5 years ago
We can:
or some combination of the above
Related: #179 is an example, first commit was fully green and was tested under ChefDK 2.0.28, a further commit tested with ChefDK 2.1.11 with ChefSpec only changes turned integration tests red whilst UNIT_AND_LINT stayed green. (Though the PR has since been rebased)
I see ChefDK 2.2.1 now; would this be resolved with that version?
Unfortunately not. 2.1.11 shipped a change in behaviour where the test-kitchen sandbox is deleted after converges, (but also introduced a bug with that behaviour that broke the mount of the sandbox)
2.2.1 ships a bug fix as noted above but the issue here is the new behaviour. We can't load the cookbook library into test-kitchen because the contents of the sandbox are deleted after converge. (sorry for confusing things, I started writing the issue thinking it was the bugged mount before coming across the behaviour change - 2.2.1 is only slightly better because instead of a broken mount it's now an empty directory)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
With the stable ChefDK 2.1.11, any kitchen-dokken test and so Travis build fails with the below.
Relevant spec_helper code: https://github.com/sous-chefs/rundeck/blob/b91dddd452fcdbb318763998349d2dff718de1c4/test/integration/default/serverspec/spec_helper.rb#L7-L14
It seems that the kitchen_sandbox directory /opt/kitchen is now not available during the verify phase, which we need for loading the api library. Possibly related to recent kitchen-dokken changes that cleanup kitchen_sandbox?
ChefDK 2.1.11 and kitchen-dokken 2.6.1
Adding output of
Dir["/opt/kitchen/*"]
to server.rb recipe so it executes during converge phase:Adding same to spec_helper so it executes during verify phase :
Poking about inside the container shows:
ChefDK 2.2.1 and kitchen-dokken 2.6.5
Tested locally and looks to be slightly improved in current channel ChefDK 2.2.1 with
kitchen-dokken
2.6.5 where at least the directory isn't borked, but is now just empty instead:ChefDK 2.0.28 and kitchen-dokken 2.5.1
Going back to ChefDK 2.0.28 fixes the problem entirely, and tests pass without the LoadError: