queries.feature 14 KB

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