chef-boneyard / minitest-chef-handler

Run minitest suites after your Chef recipes to check the status of your system.
Other
163 stars 44 forks source link

group and user asserts don't work on Windows #63

Open juliandunn opened 11 years ago

juliandunn commented 11 years ago

The group and user asserts don't work on Windows, because the Etc library on Windows isn't going to return anything. So an assertion like:

    directory("C:\\inetpub\\wwwroot").must_exist.with(:owner, "Administrator")

always returns

The directory C:\inetpub\wwwroot does not have the expected owner.
Expected: "Administrator"
  Actual: nil

Indeed, Etc.getpwnam("Administrator") on Windows returns nil under irb.

calavera commented 11 years ago

Unfortunately, that's either a Chef or a Ruby bug. We only use the resources that Chef makes available.