You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may not be the most appropriate place for this, so my apologies in advance :).
I think the Windows file matcher in inspec is not working as intended. For some reason, it cannot match any file paths I provide. It appears to make no difference whether the files were put in place by Chef or if the files were already present on the Windows system under test.
I was able to verify that other matchers such as user and os work correctly in Windows as evidenced in my inspec specification.
The output I get from kitchen and inspec is as follows:
-----> Verifying <default-win2012r2>...
....F.F.
Failures:
1) File C:\Windows should exist
Failure/Error: DEFAULT_FAILURE_NOTIFIER = lambda { |failure, _opts| raise failure }
expected File C:\Windows to exist
# ./test/integration/default/test_spec.rb:18:in `block (2 levels) in load'
2) File C:\motd should exist
Failure/Error: DEFAULT_FAILURE_NOTIFIER = lambda { |failure, _opts| raise failure }
expected File C:\motd to exist
# ./test/integration/default/test_spec.rb:23:in `block (2 levels) in load'
Finished in 24.73 seconds (files took 2 minutes 9.2 seconds to load)
8 examples, 2 failures
Failed examples:
rspec # File C:\Windows should exist
rspec # File C:\motd should exist
Finished verifying <default-win2012r2> (0m25.76s).
I created a simple cookbook in an attempt to isolate this, so it is possible my .kitchen.yml and other setup of the cookbook is incorrect.
I'm happy to help debug this further, so please let me know if there is additional information I can provide that might be useful :).
The text was updated successfully, but these errors were encountered:
In your example, it looks like be_file and be_directory work, but exists is broken. Which is weird.
I'm having a hard time following where the actual file object is located to figure out how it is actually trying to resolve exist?... I see this bit of meta-programming... which actually looks suspicious, but I couldn't say why.
This may not be the most appropriate place for this, so my apologies in advance :).
I think the Windows file matcher in inspec is not working as intended. For some reason, it cannot match any file paths I provide. It appears to make no difference whether the files were put in place by Chef or if the files were already present on the Windows system under test.
I was able to verify that other matchers such as
user
andos
work correctly in Windows as evidenced in my inspec specification.The output I get from kitchen and inspec is as follows:
I created a simple cookbook in an attempt to isolate this, so it is possible my .kitchen.yml and other setup of the cookbook is incorrect.
I'm happy to help debug this further, so please let me know if there is additional information I can provide that might be useful :).
The text was updated successfully, but these errors were encountered: