test_default.rb 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Verify that redis, rabbitmq-server, sensu-{api,client}, and Uchiwa
  2. # are all listening as expected
  3. # Redis
  4. describe port(6379) do
  5. it { should be_listening }
  6. its('protocols') { should include 'tcp' }
  7. its('addresses') { should be_in ['0.0.0.0', '::'] }
  8. end
  9. # RabbitMQ Server
  10. describe port(5671) do
  11. it { should be_listening }
  12. its('protocols') { should include 'tcp' }
  13. its('addresses') { should be_in ['0.0.0.0', '::'] }
  14. end
  15. # Sensu API
  16. describe port(4567) do
  17. it { should be_listening }
  18. its('protocols') { should include 'tcp' }
  19. its('addresses') { should be_in ['0.0.0.0', '::'] }
  20. end
  21. # Sensu Client TCP/UDP Socket
  22. describe port(3030) do
  23. it { should be_listening }
  24. its('protocols') { should include 'tcp' }
  25. # Broken on 14.04 - its('protocols') { should include 'udp' }
  26. its('addresses') { should include '127.0.0.1' }
  27. end
  28. # Sensu Client HTTP Socket
  29. describe port(3031) do
  30. it { should be_listening }
  31. its('protocols') { should include 'tcp' }
  32. its('addresses') { should include '127.0.0.1' }
  33. end
  34. # Uchiwa
  35. describe port(3000) do
  36. it { should be_listening }
  37. its('protocols') { should include 'tcp' }
  38. its('addresses') { should be_in ['0.0.0.0', '::'] }
  39. end
  40. # Ensure Sensu API has one consumer
  41. describe http('http://127.0.0.1:4567/health',
  42. auth: { user: 'admin', pass: 'secret' },
  43. params: { consumers: 1 }) do
  44. its('status') { should eq 204 }
  45. end