ddns_system.feature 5.8 KB

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