queries.feature 5.7 KB

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