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

squid_syntax_check = 'sudo squid -k parse'
if os[:family] == 'debian'
  squid_syntax_check = 'sudo squid3 -k parse'
end

describe command(squid_syntax_check) do
  its('exit_status') { should eq 0 }
  its('stderr') { should_not match /WARNING/ }
end

# wait for squid to be started
sleep 15

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

squid_syntax_check = 'sudo squid -k parse'
if os[:family] == 'debian'
  squid_syntax_check = 'sudo squid3 -k parse'
end

describe command(squid_syntax_check) do
  its('exit_status') { should eq 0 }
  its('stderr') { should_not match /WARNING/ }
end

Add a sleep before we check the port
Add a sleep before we check the port

Squid takes a while to start up

Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
