multi_instance.feature 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. Feature: Multiple instances
  2. This feature tests whether multiple instances can be run, and whether
  3. removing them does not affect the running of other instances
  4. Scenario: Multiple instances of Auth
  5. # This config should have two running instances
  6. Given I have bind10 running with configuration multi_instance/multi_auth.config
  7. And wait for bind10 stderr message BIND10_STARTED_CC
  8. And wait for bind10 stderr message CMDCTL_STARTED
  9. # This is a hack. We should actually check if b10-auth and
  10. # b10-auth-2 are started by name. But there's currently no way
  11. # for a component to find out its name and log it.
  12. And wait 2 times for bind10 stderr message AUTH_SERVER_STARTED
  13. bind10 module Auth should be running
  14. And bind10 module Resolver should not be running
  15. And bind10 module Xfrout should not be running
  16. And bind10 module Zonemgr should not be running
  17. And bind10 module Xfrin should not be running
  18. And bind10 module Stats should not be running
  19. And bind10 module StatsHttpd should not be running
  20. A query for example.com should have rcode REFUSED
  21. # this also checks whether the process is running
  22. If I remember the pid of process b10-auth
  23. And remember the pid of process b10-auth-2
  24. When I remove bind10 configuration Boss/components value b10-auth-2
  25. And wait for new bind10 stderr message BIND10_PROCESS_ENDED
  26. Then the pid of process b10-auth should not have changed
  27. And a query for example.com should have rcode REFUSED
  28. When I send bind10 the following commands
  29. """
  30. config add Boss/components b10-auth-2
  31. config set Boss/components/b10-auth-2/special auth
  32. config set Boss/components/b10-auth-2/kind needed
  33. config commit
  34. """
  35. And wait for new bind10 stderr message AUTH_SERVER_STARTED
  36. And remember the pid of process b10-auth-2
  37. Then the pid of process b10-auth should not have changed
  38. A query for example.com should have rcode REFUSED
  39. When I remove bind10 configuration Boss/components value b10-auth
  40. And wait for new bind10 stderr message BIND10_PROCESS_ENDED
  41. Then the pid of process b10-auth-2 should not have changed
  42. A query for example.com should have rcode REFUSED