ddns_system.feature 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. Feature: DDNS System
  2. A number of BIND10-specific DDNS tests, that do not fall under the
  3. 'compliance' category; specific ACL checks, module checks, etc.
  4. Scenario: Module tests
  5. # The given config has b10-ddns disabled
  6. Given I have bind10 running with configuration ddns/noddns.config
  7. And wait for bind10 stderr message BIND10_STARTED_CC
  8. And wait for bind10 stderr message AUTH_SERVER_STARTED
  9. # Sanity check
  10. bind10 module DDNS should not be running
  11. # Test 1
  12. When I use DDNS to set the SOA serial to 1235
  13. # Note: test spec says refused here, system returns SERVFAIL
  14. #The DDNS response should be REFUSED
  15. The DDNS response should be SERVFAIL
  16. And the SOA serial for example.org should be 1234
  17. # Test 2
  18. When I configure bind10 to run DDNS
  19. And wait for new bind10 stderr message DDNS_RUNNING
  20. bind10 module DDNS should be running
  21. # Test 3
  22. When I use DDNS to set the SOA serial to 1236
  23. The DDNS response should be REFUSED
  24. And the SOA serial for example.org should be 1234
  25. # Test 4
  26. When I send bind10 the following commands
  27. """
  28. config add DDNS/zones
  29. config set DDNS/zones[0]/origin example.org
  30. config add DDNS/zones[0]/update_acl {"action": "ACCEPT", "from": "127.0.0.1"}
  31. config commit
  32. """
  33. # Test 5
  34. When I use DDNS to set the SOA serial to 1237
  35. The DDNS response should be SUCCESS
  36. And the SOA serial for example.org should be 1237
  37. # Test 6
  38. When I send bind10 the command DDNS shutdown
  39. # Test 7
  40. And wait for new bind10 stderr message DDNS_RUNNING
  41. # Test 8
  42. # Known issue: after shutdown, first new attempt results in SERVFAIL
  43. When I use DDNS to set the SOA serial to 1238
  44. The DDNS response should be SERVFAIL
  45. And the SOA serial for example.org should be 1237
  46. When I use DDNS to set the SOA serial to 1238
  47. The DDNS response should be SUCCESS
  48. And the SOA serial for example.org should be 1238
  49. # Test 9
  50. When I send bind10 the command Auth shutdown
  51. And wait for new bind10 stderr message AUTH_SERVER_STARTED
  52. # Test 10
  53. When I use DDNS to set the SOA serial to 1239
  54. The DDNS response should be SUCCESS
  55. And the SOA serial for example.org should be 1239
  56. # Test 11
  57. When I configure BIND10 to stop running DDNS
  58. And wait for new bind10 stderr message DDNS_STOPPED
  59. bind10 module DDNS should not be running
  60. # Test 12
  61. When I use DDNS to set the SOA serial to 1240
  62. # should this be REFUSED again?
  63. The DDNS response should be SERVFAIL
  64. And the SOA serial for example.org should be 1239
  65. Scenario: ACL
  66. # The given config has b10-ddns disabled
  67. Given I have bind10 running with configuration ddns/ddns.config
  68. And wait for bind10 stderr message BIND10_STARTED_CC
  69. And wait for bind10 stderr message AUTH_SERVER_STARTED
  70. And wait for bind10 stderr message DDNS_RUNNING
  71. # Sanity check
  72. A query for new1.example.org should have rcode NXDOMAIN
  73. A query for new2.example.org should have rcode NXDOMAIN
  74. A query for new3.example.org should have rcode NXDOMAIN
  75. The SOA serial for example.org should be 1234
  76. # Test 1
  77. When I use DDNS to add a record new1.example.org. 3600 IN A 192.0.2.1
  78. The DDNS response should be SUCCESS
  79. A query for new1.example.org should have rcode NOERROR
  80. The SOA serial for example.org should be 1235
  81. # Test 2
  82. When I set DDNS ACL 0 for 127.0.0.1 to REJECT
  83. Then use DDNS to add a record new2.example.org. 3600 IN A 192.0.2.2
  84. The DDNS response should be REFUSED
  85. A query for new2.example.org should have rcode NXDOMAIN
  86. The SOA serial for example.org should be 1235
  87. # Test 3
  88. When I set DDNS ACL 0 for 127.0.0.1 to ACCEPT
  89. Then use DDNS to add a record new3.example.org. 3600 IN A 192.0.2.3
  90. The DDNS response should be SUCCESS
  91. A query for new3.example.org should have rcode NOERROR
  92. The SOA serial for example.org should be 1236