btm / minitest-handler-cookbook

Apache License 2.0
59 stars 36 forks source link

Unreleased version 1.2.0 has been pushed to the community site? #60

Closed matt-richardson closed 10 years ago

matt-richardson commented 10 years ago

Hi

Just been debugging an issue with running tests on a windows guest (which worked on 1.0.0, but seems to have been broken on 1.2.0).

While investigating this, I've found that the changelog says 1.2.0 is unreleased (and there's no tag for it), which to me implies that its still unstable.

However, this has been pushed to http://community.opscode.com/cookbooks/minitest-handler.

Can you please clarify the situation?

thanks, Matt

matt-richardson commented 10 years ago

Further to this, to get it running on windows guests, the slight change i had to make was in test_loader.rb, from

dir_prefix = ::File.join(cb_path, cookbook_name, 'files', 'default', '/')

to

dir_prefix = Regexp.new '[A-Za-z]?:?' + ::File.join(cb_path, cookbook_name, 'files', 'default', '/')

This supports both linux and windows paths.

I will send a PR shortly.

dpetzel commented 10 years ago

Situation is "release but steps missed in the process" Apologies for the confusion. I've applied the tag to the proper commit and updated the change log.

As for the Windows issue I'll look for the PR. I'm curious what the issue is? Hadn't noticed any issues with running this on our Windows nodes, but maybe your setup is a bit different than mine.

matt-richardson commented 10 years ago

Great, thanks for the quick response, @dpetzel.

The issue was that the run_context.cookbook_collection[cookbook_name].file_filefilenames included the drive letter, however, the Chef::Config[:cookbook_path] did not (was relative to the root).

eg (to pick a random file), the cookbook file path was: C:/tmp/vagrant-chef-1/chef-solo-1/cookbooks/cookbookname/files/default/tests/default_test.rb but the Chef::Config[:cookbook_path] resolved to: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/

so, when it did the gsub! it ended up like: C:tests/default_test.rb which didn't match the regex /^tests?\//