inspec / kitchen-inspec

Test-Kitchen Plugin for InSpec
Other
109 stars 58 forks source link

kitchen verify fails on Windows #278

Closed hurricanehrndz closed 3 years ago

hurricanehrndz commented 3 years ago

Version:

Using test-kitchen 2.11.2 Using kitchen-inspec 2.4.1

Environment:

MacOS catalina Ruby 2.7.2 via rvm

Scenario:

Very similar to #57 .

Bundle exec kitchen verify fails.

Steps to Reproduce:

---
#.kitchen.yml
driver:
  name: vagrant
  provider: vmware_desktop

provisioner:
  name: shell
  command: 'hostname'

transport:
  name: winrm

verifier:
  name: inspec

platforms:
  - name: windows-10
    os_type: windows # this setting would be inferred because of the name
    driver_config:
      communicator: winrm
      box: "StefanScherer/windows_10"

suites:
  - name: default
    verifier:
      inspec_tests:
        - test/integration/default
#test/integration/default/default_spec.rb
describe port(3389) do
  it { should be_listening }
end

describe user('mysql') do
 it { should_not exist }
end

Expected Result:

kitchen verify working

Actual Result:

[What actually happens after the reproduction steps?] kitchen.log

More Info

inspec itself works inspec exec test/integration/default/default_spec.rb --user vagrant --host 127.0.0.1 --backend winrm --password vagrant --port 2230

Profile: tests from test/integration/default/default_spec.rb (tests from test.integration.default.default_spec.rb) Version: (not specified) Target: winrm://vagrant@http://127.0.0.1:2230/wsman:3389

Port 3389 ✔ is expected to be listening User mysql ✔ is expected not to exist

Test Summary: 2 successful, 0 failures, 0 skipped

hurricanehrndz commented 3 years ago

Does not seem to a winrm issue -- it might be a kitchen-inspec issue