btm / minitest-handler-cookbook

Apache License 2.0
59 stars 36 forks source link

Only load filtered tests #58

Closed MrMMorris closed 10 years ago

MrMMorris commented 10 years ago

The filter for tests is really useful, but it seems that the handler still loads all tests it finds which feels unnecessary. Is there some way to only load tests that pass the filter?

I would submit a PR, but I have no idea what would need changing :P

dpetzel commented 10 years ago

This is a good idea. It also got me to thinking we probably have the same inefficiency around download tests for recipes that are not in the run_list. I think this might not be to difficult to implement (I hope I don't regret saying that :) ). I'll try and take a stab at this in the next few days.

dpetzel commented 10 years ago

Hey @MrMMorris, can you whats currently on master a spin. It turned out to be a little more work than I had originally thought, but I believe I have it working.

MrMMorris commented 10 years ago

Heya @dpetzel, it looks like it no longer syncs files that don't pass the filter. Thanks!

However, it seems that it still creates the minitest directories for all cookbooks (/var/chef/minitest). I'm sure this isn't as time consuming as syncing the files, but it might want to be handled the same way.

Thanks for the support!

dpetzel commented 10 years ago

Oh those sneaky empty directories.... Give the latest on master a whirl and it should take care of that.

dpetzel commented 10 years ago

@MrMMorris ping in case you didn't get the generic notification from the previous comment.

MrMMorris commented 10 years ago

@dpetzel sorry about the delay, was fighting with Berkshelf. I have tested and it's working perfectly. Thanks so much!

dpetzel commented 10 years ago

excellent!