xfrin_notify_handling.feature 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. Feature: Xfrin incoming notify handling
  2. Tests for Xfrin incoming notify handling.
  3. Scenario: Handle incoming notify
  4. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  5. And wait for master stderr message BIND10_STARTED_CC
  6. And wait for master stderr message CMDCTL_STARTED
  7. And wait for master stderr message AUTH_SERVER_STARTED
  8. And wait for master stderr message XFROUT_STARTED
  9. And wait for master stderr message ZONEMGR_STARTED
  10. And wait for master stderr message STATS_STARTING
  11. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  12. And wait for bind10 stderr message BIND10_STARTED_CC
  13. And wait for bind10 stderr message CMDCTL_STARTED
  14. And wait for bind10 stderr message AUTH_SERVER_STARTED
  15. And wait for bind10 stderr message XFRIN_STARTED
  16. And wait for bind10 stderr message ZONEMGR_STARTED
  17. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  18. #
  19. # Test for statistics
  20. #
  21. # check for initial statistics
  22. #
  23. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  24. last bindctl output should not contain "error"
  25. last bindctl output should not contain "example.org."
  26. The counter notifyoutv4 for the zone _SERVER_ should be 0
  27. The counter notifyoutv6 for the zone _SERVER_ should be 0
  28. The counter xfrrej for the zone _SERVER_ should be 0
  29. The counter xfrreqdone for the zone _SERVER_ should be 0
  30. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  31. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  32. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  33. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  34. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  35. Then wait for new bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE
  36. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
  37. Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  38. Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED
  39. A query for www.example.org to [::1]:47806 should have rcode NOERROR
  40. #
  41. # Test for statistics
  42. #
  43. # check for statistics change
  44. #
  45. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  46. last bindctl output should not contain "error"
  47. Then wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  48. The counter notifyoutv4 for the zone _SERVER_ should be 0
  49. The counter notifyoutv4 for the zone example.org. should be 0
  50. The counter notifyoutv6 for the zone _SERVER_ should be 5
  51. The counter notifyoutv6 for the zone example.org. should be 5
  52. The counter xfrrej for the zone _SERVER_ should be 0
  53. The counter xfrrej for the zone example.org. should be 0
  54. The counter xfrreqdone for the zone _SERVER_ should be 1
  55. The counter xfrreqdone for the zone example.org. should be 1
  56. #
  57. # Test for Xfr request rejected
  58. #
  59. Scenario: Handle incoming notify (XFR request rejected)
  60. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  61. And wait for master stderr message BIND10_STARTED_CC
  62. And wait for master stderr message CMDCTL_STARTED
  63. And wait for master stderr message AUTH_SERVER_STARTED
  64. And wait for master stderr message XFROUT_STARTED
  65. And wait for master stderr message ZONEMGR_STARTED
  66. And wait for master stderr message STATS_STARTING
  67. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  68. And wait for bind10 stderr message BIND10_STARTED_CC
  69. And wait for bind10 stderr message CMDCTL_STARTED
  70. And wait for bind10 stderr message AUTH_SERVER_STARTED
  71. And wait for bind10 stderr message XFRIN_STARTED
  72. And wait for bind10 stderr message ZONEMGR_STARTED
  73. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  74. #
  75. # Test1 for statistics
  76. #
  77. # check for initial statistics
  78. #
  79. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  80. last bindctl output should not contain "error"
  81. last bindctl output should not contain "example.org."
  82. The counter notifyoutv4 for the zone _SERVER_ should be 0
  83. The counter notifyoutv6 for the zone _SERVER_ should be 0
  84. The counter xfrrej for the zone _SERVER_ should be 0
  85. The counter xfrreqdone for the zone _SERVER_ should be 0
  86. #
  87. # set transfer_acl rejection
  88. # Local xfr requests from Xfrin module would be rejected here.
  89. #
  90. When I send bind10 the following commands with cmdctl port 47804
  91. """
  92. config set Xfrout/zone_config[0]/transfer_acl [{"action": "REJECT", "from": "::1"}]
  93. config commit
  94. """
  95. last bindctl output should not contain Error
  96. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  97. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  98. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  99. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  100. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  101. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_PROTOCOL_ERROR not XFRIN_XFR_TRANSFER_STARTED
  102. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED not ZONEMGR_RECEIVE_XFRIN_SUCCESS
  103. Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  104. Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED
  105. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  106. #
  107. # Test2 for statistics
  108. #
  109. # check for statistics change
  110. #
  111. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  112. last bindctl output should not contain "error"
  113. The counter notifyoutv4 for the zone _SERVER_ should be 0
  114. The counter notifyoutv4 for the zone example.org. should be 0
  115. The counter notifyoutv6 for the zone _SERVER_ should be 5
  116. The counter notifyoutv6 for the zone example.org. should be 5
  117. # The counts of rejection would be between 1 and 2. They are not
  118. # fixed. It would depend on timing or the platform.
  119. The counter xfrrej for the zone _SERVER_ should be greater than 0
  120. The counter xfrrej for the zone _SERVER_ should be less than 3
  121. The counter xfrrej for the zone example.org. should be greater than 0
  122. The counter xfrrej for the zone example.org. should be less than 3
  123. The counter xfrreqdone for the zone _SERVER_ should be 0
  124. The counter xfrreqdone for the zone example.org. should be 0