queries.feature 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. bind10 module Auth should be running
  11. And bind10 module Resolver should not be running
  12. And bind10 module Xfrout should not be running
  13. And bind10 module Zonemgr should not be running
  14. And bind10 module Xfrin should not be running
  15. And bind10 module Stats should not be running
  16. A query for www.example.org should have rcode NOERROR
  17. The last query response should have flags qr aa rd
  18. The last query response should have ancount 1
  19. The last query response should have nscount 2
  20. The last query response should have adcount 2
  21. The answer section of the last query response should be
  22. """
  23. www.example.org. 3600 IN A 192.0.2.1
  24. """
  25. The authority section of the last query response should be
  26. """
  27. example.org. 3600 IN NS ns1.example.org.
  28. example.org. 3600 IN NS ns2.example.org.
  29. """
  30. The additional section of the last query response should be
  31. """
  32. ns1.example.org. 3600 IN A 192.0.2.3
  33. ns2.example.org. 3600 IN A 192.0.2.4
  34. """
  35. # Repeat of the above
  36. A query for www.example.org should have rcode NOERROR
  37. The last query response should have flags qr aa rd
  38. The last query response should have ancount 1
  39. The last query response should have nscount 2
  40. The last query response should have adcount 2
  41. The answer section of the last query response should be
  42. """
  43. www.example.org. 3600 IN A 192.0.2.1
  44. """
  45. The authority section of the last query response should be
  46. """
  47. example.org. 3600 IN NS ns1.example.org.
  48. example.org. 3600 IN NS ns2.example.org.
  49. """
  50. The additional section of the last query response should be
  51. """
  52. ns1.example.org. 3600 IN A 192.0.2.3
  53. ns2.example.org. 3600 IN A 192.0.2.4
  54. """
  55. # And now query something completely different
  56. A query for nosuchname.example.org should have rcode NXDOMAIN
  57. The last query response should have flags qr aa rd
  58. The last query response should have ancount 0
  59. The last query response should have nscount 1
  60. The last query response should have adcount 0
  61. The authority section of the last query response should be
  62. """
  63. example.org. 3600 IN SOA ns1.example.org. admin.example.org. 1234 3600 1800 2419200 7200
  64. """
  65. Scenario: ANY query
  66. Given I have bind10 running with configuration example.org.inmem.config
  67. And wait for bind10 stderr message BIND10_STARTED_CC
  68. And wait for bind10 stderr message CMDCTL_STARTED
  69. And wait for bind10 stderr message AUTH_SERVER_STARTED
  70. bind10 module Auth should be running
  71. And bind10 module Resolver should not be running
  72. And bind10 module Xfrout should not be running
  73. And bind10 module Zonemgr should not be running
  74. And bind10 module Xfrin should not be running
  75. And bind10 module Stats should not be running
  76. A query for example.org type ANY should have rcode NOERROR
  77. The last query response should have flags qr aa rd
  78. The last query response should have ancount 4
  79. The last query response should have nscount 0
  80. The last query response should have adcount 3
  81. The answer section of the last query response should be
  82. """
  83. example.org. 3600 IN NS ns1.example.org.
  84. example.org. 3600 IN NS ns2.example.org.
  85. example.org. 3600 IN SOA ns1.example.org. admin.example.org. 1234 3600 1800 2419200 7200
  86. example.org. 3600 IN MX 10 mail.example.org.
  87. """
  88. The additional section of the last query response should be
  89. """
  90. ns1.example.org. 3600 IN A 192.0.2.3
  91. ns2.example.org. 3600 IN A 192.0.2.4
  92. mail.example.org. 3600 IN A 192.0.2.10
  93. """
  94. Scenario: Delegation query for unsigned child zone
  95. Given I have bind10 running with configuration example.org.inmem.config
  96. A dnssec query for www.sub.example.org type AAAA should have rcode NOERROR
  97. The last query response should have flags qr rd
  98. The last query response should have edns_flags do
  99. The last query response should have ancount 0
  100. The last query response should have nscount 1
  101. The last query response should have adcount 2
  102. The authority section of the last query response should be
  103. """
  104. sub.example.org. 3600 IN NS ns.sub.example.org.
  105. """
  106. The additional section of the last query response should be
  107. """
  108. ns.sub.example.org. 3600 IN A 192.0.2.101
  109. """