ddns_system.feature 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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. # Init 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. # Init 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: Zone validation check
  100. Given I have bind10 running with configuration ddns/ddns.config
  101. And wait for bind10 stderr message BIND10_STARTED_CC
  102. And wait for bind10 stderr message AUTH_SERVER_STARTED
  103. And wait for bind10 stderr message DDNS_STARTED
  104. # Sanity check
  105. A query for example.org type NS should have rcode NOERROR
  106. The answer section of the last query response should be
  107. """
  108. example.org. 3600 IN NS ns1.example.org.
  109. example.org. 3600 IN NS ns2.example.org.
  110. example.org. 3600 IN NS ns3.example.org.
  111. """
  112. The SOA serial for example.org should be 1234
  113. # Test failed validation. Here, example.org has ns1.example.org
  114. # configured as a name server. CNAME records cannot be added for
  115. # ns1.example.org.
  116. When I use DDNS to add a record ns1.example.org. 3600 IN CNAME ns3.example.org.
  117. The DDNS response should be REFUSED
  118. A query for ns1.example.org type CNAME should have rcode NXDOMAIN
  119. The SOA serial for example.org should be 1234
  120. # Test passed validation. Here, example.org does not have
  121. # ns4.example.org configured as a name server. CNAME records can
  122. # be added for ns4.example.org.
  123. When I use DDNS to add a record ns4.example.org. 3600 IN CNAME ns3.example.org.
  124. The DDNS response should be SUCCESS
  125. A query for ns4.example.org type CNAME should have rcode NOERROR
  126. The answer section of the last query response should be
  127. """
  128. ns4.example.org. 3600 IN CNAME ns3.example.org.
  129. """
  130. The SOA serial for example.org should be 1235
  131. #Scenario: DDNS and Xfrout
  132. ## Unfortunately, Xfrout can only notify to inzone slaves, and hence only
  133. ## to port 53, which we do not want to use for Lettuce tests (for various
  134. ## reasons). So for now this test is only an outline, the configs
  135. ## themselves have not been set up yet
  136. # When I start bind10 with configuration ddns/primary.config as primary
  137. # And wait for primary stderr message AUTH_SERVER_STARTED
  138. # And wait for primary stderr message XFROUT_STARTED
  139. # And wait for primary stderr message DDNS_STARTED
  140. # And I start bind10 with configuration example2.org.config with cmdctl port 47804 as secondary
  141. # And wait for secondary stderr message AUTH_SERVER_STARTED
  142. # And wait for secondary stderr message XFRIN_STARTED
  143. # # Sanity check
  144. # The SOA serial for example.org should be 1234
  145. # The SOA serial for example.org at 127.0.0.1:47807 should be 1234
  146. # When I use DDNS to set the SOA serial to 1235
  147. # The DDNS response should be SUCCESS
  148. # The SOA serial for example.org should be 1235
  149. # The SOA serial for example.org at 127.0.0.1:47807 should be 1235