Hey guys, can't figure out how to use remote_exec with patterns option. It feels that it can only work with default_pattern. Only in this case the sandbox gets created and files are transferred to the remote box.
Here are more detail, let me know if this is valid point and if we might want to fix this
Setting remote_exec=true, then default_pattern=false and using patterns won't do: no files will be transferred to the box.
If seems to be true, because method rspec_commands also heavily relies on default_pattern values producing a set of patterns via patterns and looking into default_path.
default_path is set to /tmp/kitchen/, it won't have any test suites. Feels that the only way to get files transferred to the box is setting default_pattern=true, they will end up in the sandbox-ed folder (nothing in /tmp/kitchen/) but "patterns" still look under /tmp/kitchen/
Hey guys, can't figure out how to use
remote_exec
withpatterns
option. It feels that it can only work withdefault_pattern
. Only in this case the sandbox gets created and files are transferred to the remote box.Here are more detail, let me know if this is valid point and if we might want to fix this
Here is transferring to the box with
default_pattern
, it means that we will have a sandbox-ed https://github.com/neillturner/kitchen-verifier-serverspec/blob/master/lib/kitchen/verifier/serverspec.rb#L58-L71Setting remote_exec=true, then default_pattern=false and using patterns won't do: no files will be transferred to the box.
If seems to be true, because method
rspec_commands
also heavily relies on default_pattern values producing a set of patterns viapatterns
and looking intodefault_path
.default_path is set to /tmp/kitchen/, it won't have any test suites. Feels that the only way to get files transferred to the box is setting default_pattern=true, they will end up in the sandbox-ed folder (nothing in /tmp/kitchen/) but "patterns" still look under /tmp/kitchen/
https://github.com/neillturner/kitchen-verifier-serverspec/blob/master/lib/kitchen/verifier/serverspec.rb#L281-L297
Default pattern will make this call looking under
https://github.com/neillturner/kitchen-verifier-serverspec/blob/master/lib/kitchen/verifier/serverspec.rb#L284
and then patterns will be looking into default_path! They find nothing
https://github.com/neillturner/kitchen-verifier-serverspec/blob/master/lib/kitchen/verifier/serverspec.rb#L293