server_from_sqlite3.feature 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. Feature: SQLite3 backend
  2. In order to support SQLite3
  3. As administrators
  4. We test serving an sqlite3 backend
  5. Scenario: New database
  6. Given I have no database
  7. When I start bind10 with configuration no_db_file.config
  8. Then wait for bind10 auth to start
  9. Then stop process bind10
  10. I should see a database file
  11. Scenario: example.org queries
  12. # This scenario performs a number of queries and inspects the results
  13. # This is not only to test, but also to show the different options
  14. # we have to inspect the data
  15. # This is a compound statement that starts and waits for the
  16. # started message
  17. Given I have bind10 running with configuration example.org.config
  18. # A simple query that is not examined further
  19. A query for www.example.com should have rcode REFUSED
  20. # A query where we look at some of the result properties
  21. A query for www.example.org should have rcode NOERROR
  22. The last query should have qdcount 1
  23. The last query should have ancount 1
  24. The last query should have nscount 3
  25. The last query should have adcount 0
  26. The SOA serial for example.org should be 1234
  27. # Another query where we look at some of the result properties
  28. A query for doesnotexist.example.org should have rcode NXDOMAIN
  29. The last query should have qdcount 1
  30. The last query should have ancount 0
  31. The last query should have nscount 1
  32. The last query should have adcount 0
  33. The last query should have flags qr aa rd
  34. A query for www.example.org type TXT should have rcode NOERROR
  35. The last query should have ancount 0
  36. # Some queries where we specify more details about what to send and
  37. # where
  38. A query for www.example.org class CH should have rcode REFUSED
  39. A query for www.example.org to 127.0.0.1 should have rcode NOERROR
  40. A query for www.example.org to 127.0.0.1:47806 should have rcode NOERROR
  41. A query for www.example.org type A class IN to 127.0.0.1:47806 should have rcode NOERROR
  42. Scenario: changing database
  43. # This scenario contains a lot of 'wait for' steps
  44. # If those are not present, the asynchronous nature of the application
  45. # can cause some of the things we send to be handled out of order;
  46. # for instance auth could still be serving the old zone when we send
  47. # the new query, or already respond from the new database.
  48. # Therefore we wait for specific log messages after each operation
  49. #
  50. # This scenario outlines every single step, and does not use
  51. # 'steps of steps' (e.g. Given I have bind10 running)
  52. # We can do that but as an example this is probably better to learn
  53. # the system
  54. When I start bind10 with configuration example.org.config
  55. Then wait for bind10 auth to start
  56. Wait for bind10 stderr message CMDCTL_STARTED
  57. A query for www.example.org should have rcode NOERROR
  58. Wait for bind10 stderr message AUTH_SEND_NORMAL_RESPONSE
  59. Then set bind10 configuration Auth/database_file to data/empty_db.sqlite3
  60. And wait for bind10 stderr message DATASRC_SQLITE_OPEN
  61. A query for www.example.org should have rcode REFUSED
  62. Wait for bind10 stderr message AUTH_SEND_NORMAL_RESPONSE
  63. Then set bind10 configuration Auth/database_file to data/example.org.sqlite3
  64. And wait for bind10 stderr message DATASRC_SQLITE_OPEN
  65. A query for www.example.org should have rcode NOERROR