0

From this link I could see http://serverspec.org/resource_types.html#port

describe port(80) do
  it { should be_listening }
end

I wanted to test the negative of it. Say I disabled a port and I don't want anything listening to that port.

What should be the correct test case?

Just starting out with kitchen serverspec test

4

1 回答 1

2

它应该是这样的: -

describe port(80) do
  it { should_not be_listening }
end

你可以参考同一个文档:http ://serverspec.org/resource_types.html#x509_private_key

于 2017-05-15T09:30:45.720 回答