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

Mark Estrada
  • 9,013
  • 37
  • 119
  • 186

1 Answers1

2

it should be like:-

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

you can refer in same doc: http://serverspec.org/resource_types.html#x509_private_key