ddns_system.feature 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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 NOTIMP
  14. The DDNS response should be NOTIMP
  15. And the SOA serial for example.org should be 1234
  16. # Test 2
  17. When I configure bind10 to run DDNS
  18. And wait for new bind10 stderr message DDNS_STARTED
  19. bind10 module DDNS should be running
  20. # Test 3
  21. When I use DDNS to set the SOA serial to 1236
  22. The DDNS response should be REFUSED
  23. And the SOA serial for example.org should be 1234
  24. # Test 4
  25. When I send bind10 the following commands
  26. """
  27. config add DDNS/zones
  28. config set DDNS/zones[0]/origin example.org
  29. config add DDNS/zones[0]/update_acl {"action": "ACCEPT", "from": "127.0.0.1"}
  30. config commit
  31. """
  32. # Test 5
  33. When I use DDNS to set the SOA serial to 1237
  34. # also check if Auth server reloaded
  35. And wait for new bind10 stderr message AUTH_DATASRC_CLIENTS_BUILDER_LOAD_ZONE
  36. The DDNS response should be SUCCESS
  37. And the SOA serial for example.org should be 1237
  38. # Test 6
  39. When I send bind10 the command DDNS shutdown
  40. And wait for new bind10 stderr message DDNS_STOPPED
  41. # Test 7
  42. # BoB should restart it
  43. And wait for new bind10 stderr message DDNS_STARTED
  44. # Test 8
  45. When I use DDNS to set the SOA serial to 1238
  46. And wait for new bind10 stderr message AUTH_DATASRC_CLIENTS_BUILDER_LOAD_ZONE
  47. The DDNS response should be SUCCESS
  48. And the SOA serial for example.org should be 1238
  49. When I use DDNS to set the SOA serial to 1239
  50. And wait for new bind10 stderr message AUTH_DATASRC_CLIENTS_BUILDER_LOAD_ZONE
  51. The DDNS response should be SUCCESS
  52. And the SOA serial for example.org should be 1239
  53. # Test 9
  54. When I send bind10 the command Auth shutdown
  55. And wait for new bind10 stderr message AUTH_SHUTDOWN
  56. # BoB should restart it automatically
  57. And wait for new bind10 stderr message AUTH_SERVER_STARTED
  58. # Test 10
  59. When I use DDNS to set the SOA serial to 1240
  60. And wait for new bind10 stderr message AUTH_DATASRC_CLIENTS_BUILDER_LOAD_ZONE
  61. The DDNS response should be SUCCESS
  62. And the SOA serial for example.org should be 1240
  63. # Test 11
  64. When I configure BIND10 to stop running DDNS
  65. And wait for new bind10 stderr message DDNS_STOPPED
  66. bind10 module DDNS should not be running
  67. # Test 12
  68. When I use DDNS to set the SOA serial to 1241
  69. # should this be REFUSED again?
  70. The DDNS response should be NOTIMP
  71. And the SOA serial for example.org should be 1240
  72. Scenario: ACL
  73. Given I have bind10 running with configuration ddns/ddns.config
  74. And wait for bind10 stderr message BIND10_STARTED_CC
  75. And wait for bind10 stderr message AUTH_SERVER_STARTED
  76. And wait for bind10 stderr message DDNS_STARTED
  77. # Sanity check
  78. A query for new1.example.org should have rcode NXDOMAIN
  79. A query for new2.example.org should have rcode NXDOMAIN
  80. A query for new3.example.org should have rcode NXDOMAIN
  81. The SOA serial for example.org should be 1234
  82. # Test 1
  83. When I use DDNS to add a record new1.example.org. 3600 IN A 192.0.2.1
  84. The DDNS response should be SUCCESS
  85. A query for new1.example.org should have rcode NOERROR
  86. The SOA serial for example.org should be 1235
  87. # Test 2
  88. When I set DDNS ACL 0 for 127.0.0.1 to REJECT
  89. Then use DDNS to add a record new2.example.org. 3600 IN A 192.0.2.2
  90. The DDNS response should be REFUSED
  91. A query for new2.example.org should have rcode NXDOMAIN
  92. The SOA serial for example.org should be 1235
  93. # Test 3
  94. When I set DDNS ACL 0 for 127.0.0.1 to ACCEPT
  95. Then use DDNS to add a record new3.example.org. 3600 IN A 192.0.2.3
  96. The DDNS response should be SUCCESS
  97. A query for new3.example.org should have rcode NOERROR
  98. The SOA serial for example.org should be 1236
  99. #Scenario: DDNS and Xfrout
  100. ## Unfortunately, Xfrout can only notify to inzone slaves, and hence only
  101. ## to port 53, which we do not want to use for Lettuce tests (for various
  102. ## reasons). So for now this test is only an outline, the configs
  103. ## themselves have not been set up yet
  104. # When I start bind10 with configuration ddns/primary.config as primary
  105. # And wait for primary stderr message AUTH_SERVER_STARTED
  106. # And wait for primary stderr message XFROUT_STARTED
  107. # And wait for primary stderr message DDNS_STARTED
  108. # And I start bind10 with configuration example2.org.config with cmdctl port 47804 as secondary
  109. # And wait for secondary stderr message AUTH_SERVER_STARTED
  110. # And wait for secondary stderr message XFRIN_STARTED
  111. # # Sanity check
  112. # The SOA serial for example.org should be 1234
  113. # The SOA serial for example.org at 127.0.0.1:47807 should be 1234
  114. # When I use DDNS to set the SOA serial to 1235
  115. # The DDNS response should be SUCCESS
  116. # The SOA serial for example.org should be 1235
  117. # The SOA serial for example.org at 127.0.0.1:47807 should be 1235