multi_instance.feature 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. # Standard check to test (non-)existence of a file
  6. # This file is actually automatically
  7. The file data/test_nonexistent_db.sqlite3 should not exist
  8. # This config should have two running instances
  9. Given I have bind10 running with configuration multi_instance/multi_auth.config
  10. And wait for bind10 stderr message BIND10_STARTED_CC
  11. And wait for bind10 stderr message CMDCTL_STARTED
  12. # This is a hack. We should actually check if b10-auth and
  13. # b10-auth-2 are started by name. But there's currently no way
  14. # for a component to find out its name and log it.
  15. And wait 2 times for bind10 stderr message AUTH_SERVER_STARTED
  16. bind10 module Auth should be running
  17. And bind10 module Resolver should not be running
  18. And bind10 module Xfrout should not be running
  19. And bind10 module Zonemgr should not be running
  20. And bind10 module Xfrin should not be running
  21. And bind10 module Stats should not be running
  22. And bind10 module StatsHttpd should not be running
  23. # Now we use the first step again to see if the file has been created
  24. The file data/test_nonexistent_db.sqlite3 should exist
  25. A query for example.com should have rcode REFUSED
  26. # this also checks whether the process is running
  27. If I remember the pid of process b10-auth
  28. And remember the pid of process b10-auth-2
  29. When I remove bind10 configuration Init/components value b10-auth-2
  30. And wait for new bind10 stderr message BIND10_PROCESS_ENDED
  31. Then the pid of process b10-auth should not have changed
  32. And a query for example.com should have rcode REFUSED
  33. When I send bind10 the following commands
  34. """
  35. config add Init/components b10-auth-2
  36. config set Init/components/b10-auth-2/special auth
  37. config set Init/components/b10-auth-2/kind needed
  38. config commit
  39. """
  40. And wait for new bind10 stderr message AUTH_SERVER_STARTED
  41. And remember the pid of process b10-auth-2
  42. Then the pid of process b10-auth should not have changed
  43. A query for example.com should have rcode REFUSED
  44. When I remove bind10 configuration Init/components value b10-auth
  45. And wait for new bind10 stderr message BIND10_PROCESS_ENDED
  46. Then the pid of process b10-auth-2 should not have changed
  47. A query for example.com should have rcode REFUSED