server_from_sqlite3.feature 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 bind10
  10. I should see a database file
  11. Scenario: example.org queries
  12. When I start bind10 with configuration example.org.config
  13. Then wait for bind10 auth to start
  14. A query for www.example.com should have rcode REFUSED
  15. A query for www.example.org should have rcode NOERROR
  16. A query for doesnotexist.example.org should have rcode NXDOMAIN
  17. Scenario: changing database
  18. # This scenario contains a lot of 'wait for' steps
  19. # If those are not present, the asynchronous nature of the application
  20. # can cause some of the things we send to be handled out of order;
  21. # for instance auth could still be serving the old zone when we send
  22. # the new query, or already respond from the new database.
  23. # Therefore we wait for specific log messages after each operation
  24. When I start bind10 with configuration example.org.config
  25. Then wait for bind10 auth to start
  26. Wait for log message CMDCTL_STARTED
  27. A query for www.example.org should have rcode NOERROR
  28. Wait for log message AUTH_SEND_NORMAL_RESPONSE
  29. Then set bind10 configuration Auth/database_file to data/empty_db.sqlite3
  30. And wait for log message DATASRC_SQLITE_OPEN
  31. A query for www.example.org should have rcode REFUSED
  32. Wait for log message AUTH_SEND_NORMAL_RESPONSE
  33. Then set bind10 configuration Auth/database_file to data/example.org.sqlite3
  34. And wait for log message DATASRC_SQLITE_OPEN
  35. A query for www.example.org should have rcode NOERROR