queries.feature 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. Feature: Querying feature
  2. This feature is a collection of non-specific querying tests;
  3. for instance whether multiple queries in a row return consistent
  4. answers.
  5. Scenario: Repeated queries
  6. Given I have bind10 running with configuration example.org.inmem.config
  7. And wait for bind10 stderr message BIND10_STARTED_CC
  8. And wait for bind10 stderr message CMDCTL_STARTED
  9. And wait for bind10 stderr message AUTH_SERVER_STARTED
  10. And wait for bind10 stderr message STATS_STARTING
  11. bind10 module Auth should be running
  12. And bind10 module Stats should be running
  13. And bind10 module Resolver should not be running
  14. And bind10 module Xfrout should not be running
  15. And bind10 module Zonemgr should not be running
  16. And bind10 module Xfrin should not be running
  17. And bind10 module StatsHttpd should not be running
  18. When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  19. And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
  20. Then I query statistics zones of bind10 module Auth
  21. And last bindctl output should not contain "error"
  22. The statistics counters are 0 in category .Auth.zones._SERVER_
  23. A query for www.example.org should have rcode NOERROR
  24. The last query response should have flags qr aa rd
  25. The last query response should have ancount 1
  26. The last query response should have nscount 2
  27. The last query response should have adcount 2
  28. The answer section of the last query response should be
  29. """
  30. www.example.org. 3600 IN A 192.0.2.1
  31. """
  32. The authority section of the last query response should be
  33. """
  34. example.org. 3600 IN NS ns1.example.org.
  35. example.org. 3600 IN NS ns2.example.org.
  36. """
  37. The additional section of the last query response should be
  38. """
  39. ns1.example.org. 3600 IN A 192.0.2.3
  40. ns2.example.org. 3600 IN A 192.0.2.4
  41. """
  42. When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  43. And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
  44. Then I query statistics zones of bind10 module Auth
  45. And last bindctl output should not contain "error"
  46. The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items
  47. | item_name | item_value |
  48. | request.v4 | 1 |
  49. | request.udp | 1 |
  50. | opcode.query | 1 |
  51. | responses | 1 |
  52. | qrysuccess | 1 |
  53. | qryauthans | 1 |
  54. | rcode.noerror | 1 |
  55. # Repeat of the above
  56. A query for www.example.org should have rcode NOERROR
  57. The last query response should have flags qr aa rd
  58. The last query response should have ancount 1
  59. The last query response should have nscount 2
  60. The last query response should have adcount 2
  61. The answer section of the last query response should be
  62. """
  63. www.example.org. 3600 IN A 192.0.2.1
  64. """
  65. The authority section of the last query response should be
  66. """
  67. example.org. 3600 IN NS ns1.example.org.
  68. example.org. 3600 IN NS ns2.example.org.
  69. """
  70. The additional section of the last query response should be
  71. """
  72. ns1.example.org. 3600 IN A 192.0.2.3
  73. ns2.example.org. 3600 IN A 192.0.2.4
  74. """
  75. When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  76. And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
  77. Then I query statistics zones of bind10 module Auth
  78. And last bindctl output should not contain "error"
  79. The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items
  80. | item_name | item_value |
  81. | request.v4 | 2 |
  82. | request.udp | 2 |
  83. | opcode.query | 2 |
  84. | responses | 2 |
  85. | qrysuccess | 2 |
  86. | qryauthans | 2 |
  87. | rcode.noerror | 2 |
  88. # And now query something completely different
  89. A query for nosuchname.example.org should have rcode NXDOMAIN
  90. The last query response should have flags qr aa rd
  91. The last query response should have ancount 0
  92. The last query response should have nscount 1
  93. The last query response should have adcount 0
  94. The authority section of the last query response should be
  95. """
  96. example.org. 3600 IN SOA ns1.example.org. admin.example.org. 1234 3600 1800 2419200 7200
  97. """
  98. When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  99. And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
  100. Then I query statistics zones of bind10 module Auth
  101. And last bindctl output should not contain "error"
  102. The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items
  103. | item_name | item_value |
  104. | request.v4 | 3 |
  105. | request.udp | 3 |
  106. | opcode.query | 3 |
  107. | responses | 3 |
  108. | qrysuccess | 2 |
  109. | qryauthans | 3 |
  110. | rcode.noerror | 2 |
  111. | rcode.nxdomain | 1 |
  112. Scenario: ANY query
  113. Given I have bind10 running with configuration example.org.inmem.config
  114. And wait for bind10 stderr message BIND10_STARTED_CC
  115. And wait for bind10 stderr message CMDCTL_STARTED
  116. And wait for bind10 stderr message AUTH_SERVER_STARTED
  117. bind10 module Auth should be running
  118. And bind10 module Stats should be running
  119. And bind10 module Resolver should not be running
  120. And bind10 module Xfrout should not be running
  121. And bind10 module Zonemgr should not be running
  122. And bind10 module Xfrin should not be running
  123. And bind10 module StatsHttpd should not be running
  124. When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  125. And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
  126. Then I query statistics zones of bind10 module Auth
  127. And last bindctl output should not contain "error"
  128. The statistics counters are 0 in category .Auth.zones._SERVER_
  129. A query for example.org type ANY should have rcode NOERROR
  130. The last query response should have flags qr aa rd
  131. The last query response should have ancount 4
  132. The last query response should have nscount 0
  133. The last query response should have adcount 3
  134. The answer section of the last query response should be
  135. """
  136. example.org. 3600 IN NS ns1.example.org.
  137. example.org. 3600 IN NS ns2.example.org.
  138. example.org. 3600 IN SOA ns1.example.org. admin.example.org. 1234 3600 1800 2419200 7200
  139. example.org. 3600 IN MX 10 mail.example.org.
  140. """
  141. The additional section of the last query response should be
  142. """
  143. ns1.example.org. 3600 IN A 192.0.2.3
  144. ns2.example.org. 3600 IN A 192.0.2.4
  145. mail.example.org. 3600 IN A 192.0.2.10
  146. """
  147. When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  148. And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
  149. Then I query statistics zones of bind10 module Auth
  150. And last bindctl output should not contain "error"
  151. The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items
  152. | item_name | item_value |
  153. | request.v4 | 1 |
  154. | request.udp | 1 |
  155. | opcode.query | 1 |
  156. | responses | 1 |
  157. | qrysuccess | 1 |
  158. | qryauthans | 1 |
  159. | rcode.noerror | 1 |
  160. Scenario: Delegation query for unsigned child zone
  161. Given I have bind10 running with configuration example.org.inmem.config
  162. And wait for bind10 stderr message BIND10_STARTED_CC
  163. And wait for bind10 stderr message CMDCTL_STARTED
  164. And wait for bind10 stderr message AUTH_SERVER_STARTED
  165. When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  166. And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
  167. Then I query statistics zones of bind10 module Auth
  168. And last bindctl output should not contain "error"
  169. The statistics counters are 0 in category .Auth.zones._SERVER_
  170. A dnssec query for www.sub.example.org type AAAA should have rcode NOERROR
  171. The last query response should have flags qr rd
  172. The last query response should have edns_flags do
  173. The last query response should have ancount 0
  174. The last query response should have nscount 1
  175. The last query response should have adcount 2
  176. The authority section of the last query response should be
  177. """
  178. sub.example.org. 3600 IN NS ns.sub.example.org.
  179. """
  180. The additional section of the last query response should be
  181. """
  182. ns.sub.example.org. 3600 IN A 192.0.2.101
  183. """
  184. When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  185. And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
  186. Then I query statistics zones of bind10 module Auth
  187. And last bindctl output should not contain "error"
  188. The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items
  189. | item_name | item_value |
  190. | request.v4 | 1 |
  191. | request.udp | 1 |
  192. | request.edns0 | 1 |
  193. | request.dnssec_ok | 1 |
  194. | opcode.query | 1 |
  195. | responses | 1 |
  196. | response.edns0 | 1 |
  197. | qrynoauthans | 1 |
  198. | qryreferral | 1 |
  199. | rcode.noerror | 1 |
  200. Scenario: SSHFP query
  201. # We are testing one more RR type for a normal successful case
  202. Given I have bind10 running with configuration example.org.inmem.config
  203. And wait for bind10 stderr message BIND10_STARTED_CC
  204. And wait for bind10 stderr message CMDCTL_STARTED
  205. And wait for bind10 stderr message AUTH_SERVER_STARTED
  206. bind10 module Auth should be running
  207. And bind10 module Stats should be running
  208. And bind10 module Resolver should not be running
  209. And bind10 module Xfrout should not be running
  210. And bind10 module Zonemgr should not be running
  211. And bind10 module Xfrin should not be running
  212. And bind10 module StatsHttpd should not be running
  213. When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  214. And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
  215. Then I query statistics zones of bind10 module Auth
  216. And last bindctl output should not contain "error"
  217. The statistics counters are 0 in category .Auth.zones._SERVER_
  218. A query for example.org type SSHFP should have rcode NOERROR
  219. The last query response should have ancount 0
  220. When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  221. And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
  222. Then I query statistics zones of bind10 module Auth
  223. And last bindctl output should not contain "error"
  224. The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items
  225. | item_name | item_value |
  226. | request.v4 | 1 |
  227. | request.udp | 1 |
  228. | opcode.query | 1 |
  229. | responses | 1 |
  230. | qryauthans | 1 |
  231. | qrynxrrset | 1 |
  232. | rcode.noerror | 1 |
  233. A query for shell.example.org type SSHFP should have rcode NOERROR
  234. The last query response should have ancount 1
  235. The answer section of the last query response should be
  236. """
  237. shell.example.org. 3600 IN SSHFP 2 1 123456789abcdef67890123456789abcdef67890
  238. """
  239. When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  240. And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
  241. Then I query statistics zones of bind10 module Auth
  242. And last bindctl output should not contain "error"
  243. The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items
  244. | item_name | item_value |
  245. | request.v4 | 2 |
  246. | request.udp | 2 |
  247. | opcode.query | 2 |
  248. | responses | 2 |
  249. | qrysuccess | 1 |
  250. | qryauthans | 2 |
  251. | qrynxrrset | 1 |
  252. | rcode.noerror | 2 |