Closed mattstratton closed 9 years ago
Looks great, thanks for all the hard work Matt! I'll merge this in with the current branch and play around with it tomorrow. I don't foresee any issues.
I haven't played with test-kitchen much. I assume since we'd need to test on a Windows instance, it probably makes it difficult to integrate with travis? Would be nice to have an automated build for these kinds of things, but I don't know that there's a great place to put it. I suppose we could still run rubocop and foodcritic on it though.
Yeah, the kitchen support for Windows isn't quite finished, but it works quite well. I would expect it to be merged into the master gem in the near future (mostly it is a lot of regression testing right now).
The issues I've having with getting kitchen working on Win2k8R2 seem to be more of issues with my test boxes not having the right WinRM settings; I can do it, but it's ugly and I don't want to put those ugly platforms into the .kitchen.yml yet :)
There's really no way to run automated test-kitchen (or anything on Windows cookbooks) on Travis, but at the minimum, we could execute foodcritic and rubocopy against it (like you said). We can't even do Chefspec, because there is a weird thing going on where the machine running Chefspec has to be the same platform as the cookbook (i.e., the faked out chef on *nix won't have the resources for Windows, etc).
We might not be able to have a super automated pipeline, but I would say before accepting a merge, it would need to pass the kitchen tests, and maybe in the short term you would ask a contributor to at least verify the tests passed by pasting the results into the PR? :)
Yeah that sounds good. I have an internal TeamCity instance that runs on Windows, I might just throw it on that to make life a bit easier. If I get time, I may do that tomorrow for the foodcritc, rubocop and ChefSpec tasks.
I started a new branch in my repo to add tests using Pester instead of Serverspec, and they work pretty well. Unfortunately the powershell cmdlets I'm using for the testing only work for Server 2012 and above, so we probably can fall back to serverspec for the older versions (which isn't an issue as yet since kitchen on Windows isn't working in this cookbook yet anyway).
Aren't you glad that this cookbook is where I'm trying this stuff out? It's going to be the best-tested Windows cookbook by the time we're done :)
This includes all the merges from @chlsmith and adds the following functionality:
batch
resource instead ofwindows_batch
Outstanding items for discussion
:open
. Should it be:create
since we are creating firewall rules?