queries.feature 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. A query for www.example.org should have rcode NOERROR
  8. The last query response should have flags qr aa rd
  9. The last query response should have ancount 1
  10. The last query response should have nscount 2
  11. The last query response should have adcount 2
  12. The answer section of the last query response should be
  13. """
  14. www.example.org. 3600 IN A 192.0.2.1
  15. """
  16. The authority section of the last query response should be
  17. """
  18. example.org. 3600 IN NS ns1.example.org.
  19. example.org. 3600 IN NS ns2.example.org.
  20. """
  21. The additional section of the last query response should be
  22. """
  23. ns1.example.org. 3600 IN A 192.0.2.3
  24. ns2.example.org. 3600 IN A 192.0.2.4
  25. """
  26. # Repeat of the above
  27. A query for www.example.org should have rcode NOERROR
  28. The last query response should have flags qr aa rd
  29. The last query response should have ancount 1
  30. The last query response should have nscount 2
  31. The last query response should have adcount 2
  32. The answer section of the last query response should be
  33. """
  34. www.example.org. 3600 IN A 192.0.2.1
  35. """
  36. The authority section of the last query response should be
  37. """
  38. example.org. 3600 IN NS ns1.example.org.
  39. example.org. 3600 IN NS ns2.example.org.
  40. """
  41. The additional section of the last query response should be
  42. """
  43. ns1.example.org. 3600 IN A 192.0.2.3
  44. ns2.example.org. 3600 IN A 192.0.2.4
  45. """
  46. # And now query something completely different
  47. A query for nosuchname.example.org should have rcode NXDOMAIN
  48. The last query response should have flags qr aa rd
  49. The last query response should have ancount 0
  50. The last query response should have nscount 1
  51. The last query response should have adcount 0
  52. The authority section of the last query response should be
  53. """
  54. example.org. 3600 IN SOA ns1.example.org. admin.example.org. 1234 3600 1800 2419200 7200
  55. """
  56. Scenario: ANY query
  57. Given I have bind10 running with configuration example.org.inmem.config
  58. A query for example.org type ANY should have rcode NOERROR
  59. The last query response should have flags qr aa rd
  60. The last query response should have ancount 4
  61. The last query response should have nscount 0
  62. The last query response should have adcount 3
  63. The answer section of the last query response should be
  64. """
  65. example.org. 3600 IN NS ns1.example.org.
  66. example.org. 3600 IN NS ns2.example.org.
  67. example.org. 3600 IN SOA ns1.example.org. admin.example.org. 1234 3600 1800 2419200 7200
  68. example.org. 3600 IN MX 10 mail.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. mail.example.org. 3600 IN A 192.0.2.10
  75. """