You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

311 lines
17 KiB

  1. #define BOOST_TEST_DYN_LINK
  2. #define BOOST_TEST_NO_MAIN
  3. #ifdef HAVE_CONFIG_H
  4. #include "config.h"
  5. #endif
  6. #include <boost/test/unit_test.hpp>
  7. #include "test-common.hh"
  8. #include "ixfr.hh"
  9. BOOST_AUTO_TEST_SUITE(test_ixfr_cc)
  10. BOOST_AUTO_TEST_CASE(test_ixfr_rfc1995_axfr) {
  11. const ComboAddress master("[2001:DB8::1]:53");
  12. const DNSName zone("JAIN.AD.JP.");
  13. auto masterSOA = DNSRecordContent::mastermake(QType::SOA, QClass::IN, "NS.JAIN.AD.JP. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  14. vector<DNSRecord> records;
  15. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  16. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::NS, "NS.JAIN.AD.JP.");
  17. addRecordToList(records, DNSName("NS.JAIN.AD.JP."), QType::A, "133.69.136.1");
  18. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.3");
  19. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "192.41.197.2");
  20. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  21. auto ret = processIXFRRecords(master, zone, records, std::dynamic_pointer_cast<SOARecordContent>(masterSOA));
  22. BOOST_CHECK_EQUAL(ret.size(), 1U);
  23. BOOST_CHECK_EQUAL(ret.at(0).first.size(), 0U);
  24. BOOST_REQUIRE_EQUAL(ret.at(0).second.size(), records.size());
  25. for (size_t idx = 0; idx < records.size(); idx++) {
  26. BOOST_CHECK(ret.at(0).second.at(idx) == records.at(idx));
  27. }
  28. }
  29. BOOST_AUTO_TEST_CASE(test_ixfr_rfc1995_incremental) {
  30. const ComboAddress master("[2001:DB8::1]:53");
  31. const DNSName zone("JAIN.AD.JP.");
  32. auto masterSOA = DNSRecordContent::mastermake(QType::SOA, QClass::IN, "NS.JAIN.AD.JP. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  33. vector<DNSRecord> records;
  34. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  35. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 1 600 600 3600000 604800");
  36. addRecordToList(records, DNSName("NEZU.JAIN.AD.JP."), QType::A, "133.69.136.5");
  37. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 2 600 600 3600000 604800");
  38. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.4");
  39. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "192.41.197.2");
  40. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 2 600 600 3600000 604800");
  41. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.4");
  42. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  43. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.3");
  44. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  45. auto ret = processIXFRRecords(master, zone, records, std::dynamic_pointer_cast<SOARecordContent>(masterSOA));
  46. // two sequences
  47. BOOST_CHECK_EQUAL(ret.size(), 2U);
  48. // the first one has one removal, two additions (plus the corresponding SOA removal/addition)
  49. BOOST_CHECK_EQUAL(ret.at(0).first.size(), 1U + 1U);
  50. BOOST_CHECK_EQUAL(ret.at(0).second.size(), 2U + 1U);
  51. // check removals
  52. BOOST_CHECK_EQUAL(ret.at(0).first.at(0).d_type, QType(QType::SOA).getCode());
  53. BOOST_CHECK_EQUAL(ret.at(0).first.at(1).d_type, QType(QType::A).getCode());
  54. // check additions
  55. BOOST_CHECK_EQUAL(ret.at(0).second.at(0).d_type, QType(QType::SOA).getCode());
  56. BOOST_CHECK_EQUAL(ret.at(0).second.at(1).d_type, QType(QType::A).getCode());
  57. BOOST_CHECK_EQUAL(ret.at(0).second.at(2).d_type, QType(QType::A).getCode());
  58. // the second one has one removal, one addition
  59. BOOST_CHECK_EQUAL(ret.at(1).first.size(), 1U + 1U);
  60. BOOST_CHECK_EQUAL(ret.at(1).second.size(), 1U + 1U);
  61. // check removals
  62. BOOST_CHECK_EQUAL(ret.at(1).first.at(0).d_type, QType(QType::SOA).getCode());
  63. BOOST_CHECK_EQUAL(ret.at(1).first.at(1).d_type, QType(QType::A).getCode());
  64. // check additions
  65. BOOST_CHECK_EQUAL(ret.at(1).second.at(0).d_type, QType(QType::SOA).getCode());
  66. BOOST_CHECK_EQUAL(ret.at(1).second.at(1).d_type, QType(QType::A).getCode());
  67. }
  68. BOOST_AUTO_TEST_CASE(test_ixfr_rfc1995_condensed_incremental) {
  69. const ComboAddress master("[2001:DB8::1]:53");
  70. const DNSName zone("JAIN.AD.JP.");
  71. auto masterSOA = DNSRecordContent::mastermake(QType::SOA, QClass::IN, "NS.JAIN.AD.JP. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  72. vector<DNSRecord> records;
  73. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  74. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 1 600 600 3600000 604800");
  75. addRecordToList(records, DNSName("NEZU.JAIN.AD.JP."), QType::A, "133.69.136.5");
  76. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  77. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.3");
  78. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "192.41.197.2");
  79. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  80. auto ret = processIXFRRecords(master, zone, records, std::dynamic_pointer_cast<SOARecordContent>(masterSOA));
  81. // one sequence
  82. BOOST_CHECK_EQUAL(ret.size(), 1U);
  83. // it has one removal, two additions (plus the corresponding SOA removal/addition)
  84. BOOST_CHECK_EQUAL(ret.at(0).first.size(), 1U + 1U);
  85. BOOST_CHECK_EQUAL(ret.at(0).second.size(), 2U + 1U);
  86. // check removals
  87. BOOST_CHECK_EQUAL(ret.at(0).first.at(0).d_type, QType(QType::SOA).getCode());
  88. BOOST_CHECK_EQUAL(ret.at(0).first.at(1).d_type, QType(QType::A).getCode());
  89. // check additions
  90. BOOST_CHECK_EQUAL(ret.at(0).second.at(0).d_type, QType(QType::SOA).getCode());
  91. BOOST_CHECK_EQUAL(ret.at(0).second.at(1).d_type, QType(QType::A).getCode());
  92. BOOST_CHECK_EQUAL(ret.at(0).second.at(2).d_type, QType(QType::A).getCode());
  93. }
  94. BOOST_AUTO_TEST_CASE(test_ixfr_no_additions_in_first_sequence) {
  95. const ComboAddress master("[2001:DB8::1]:53");
  96. const DNSName zone("JAIN.AD.JP.");
  97. auto masterSOA = DNSRecordContent::mastermake(QType::SOA, QClass::IN, "NS.JAIN.AD.JP. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  98. vector<DNSRecord> records;
  99. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  100. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 1 600 600 3600000 604800");
  101. addRecordToList(records, DNSName("NEZU.JAIN.AD.JP."), QType::A, "133.69.136.5");
  102. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 2 600 600 3600000 604800");
  103. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 2 600 600 3600000 604800");
  104. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.5");
  105. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  106. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.3");
  107. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  108. auto ret = processIXFRRecords(master, zone, records, std::dynamic_pointer_cast<SOARecordContent>(masterSOA));
  109. // two sequences
  110. BOOST_CHECK_EQUAL(ret.size(), 2U);
  111. // the first one has one removal, no additions (plus the corresponding SOA removal/addition)
  112. BOOST_CHECK_EQUAL(ret.at(0).first.size(), 1U + 1U);
  113. BOOST_CHECK_EQUAL(ret.at(0).second.size(), 0U + 1U);
  114. // check removals
  115. BOOST_CHECK_EQUAL(ret.at(0).first.at(0).d_type, QType(QType::SOA).getCode());
  116. BOOST_CHECK_EQUAL(ret.at(0).first.at(1).d_type, QType(QType::A).getCode());
  117. // check additions
  118. BOOST_CHECK_EQUAL(ret.at(0).second.at(0).d_type, QType(QType::SOA).getCode());
  119. // the second one has one removal, one addition
  120. BOOST_CHECK_EQUAL(ret.at(1).first.size(), 1U + 1U);
  121. BOOST_CHECK_EQUAL(ret.at(1).second.size(), 1U + 1U);
  122. // check removals
  123. BOOST_CHECK_EQUAL(ret.at(1).first.at(0).d_type, QType(QType::SOA).getCode());
  124. BOOST_CHECK_EQUAL(ret.at(1).first.at(1).d_type, QType(QType::A).getCode());
  125. // check additions
  126. BOOST_CHECK_EQUAL(ret.at(1).second.at(0).d_type, QType(QType::SOA).getCode());
  127. BOOST_CHECK_EQUAL(ret.at(1).second.at(1).d_type, QType(QType::A).getCode());
  128. }
  129. BOOST_AUTO_TEST_CASE(test_ixfr_no_removals_in_first_sequence) {
  130. const ComboAddress master("[2001:DB8::1]:53");
  131. const DNSName zone("JAIN.AD.JP.");
  132. auto masterSOA = DNSRecordContent::mastermake(QType::SOA, QClass::IN, "NS.JAIN.AD.JP. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  133. vector<DNSRecord> records;
  134. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  135. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 1 600 600 3600000 604800");
  136. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 2 600 600 3600000 604800");
  137. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.4");
  138. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "192.41.197.2");
  139. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 2 600 600 3600000 604800");
  140. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.4");
  141. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  142. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.3");
  143. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  144. auto ret = processIXFRRecords(master, zone, records, std::dynamic_pointer_cast<SOARecordContent>(masterSOA));
  145. // two sequences
  146. BOOST_CHECK_EQUAL(ret.size(), 2U);
  147. // the first one has no removal, two additions (plus the corresponding SOA removal/addition)
  148. BOOST_CHECK_EQUAL(ret.at(0).first.size(), 0U + 1U);
  149. BOOST_CHECK_EQUAL(ret.at(0).second.size(), 2U + 1U);
  150. // check removals
  151. BOOST_CHECK_EQUAL(ret.at(0).first.at(0).d_type, QType(QType::SOA).getCode());
  152. // check additions
  153. BOOST_CHECK_EQUAL(ret.at(0).second.at(0).d_type, QType(QType::SOA).getCode());
  154. BOOST_CHECK_EQUAL(ret.at(0).second.at(1).d_type, QType(QType::A).getCode());
  155. BOOST_CHECK_EQUAL(ret.at(0).second.at(1).d_type, QType(QType::A).getCode());
  156. // the second one has one removal, one addition
  157. BOOST_CHECK_EQUAL(ret.at(1).first.size(), 1U + 1U);
  158. BOOST_CHECK_EQUAL(ret.at(1).second.size(), 1U + 1U);
  159. // check removals
  160. BOOST_CHECK_EQUAL(ret.at(1).first.at(0).d_type, QType(QType::SOA).getCode());
  161. BOOST_CHECK_EQUAL(ret.at(1).first.at(1).d_type, QType(QType::A).getCode());
  162. // check additions
  163. BOOST_CHECK_EQUAL(ret.at(1).second.at(0).d_type, QType(QType::SOA).getCode());
  164. BOOST_CHECK_EQUAL(ret.at(1).second.at(1).d_type, QType(QType::A).getCode());
  165. }
  166. BOOST_AUTO_TEST_CASE(test_ixfr_same_serial) {
  167. const ComboAddress master("[2001:DB8::1]:53");
  168. const DNSName zone("JAIN.AD.JP.");
  169. auto masterSOA = DNSRecordContent::mastermake(QType::SOA, QClass::IN, "NS.JAIN.AD.JP. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  170. vector<DNSRecord> records;
  171. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  172. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  173. auto ret = processIXFRRecords(master, zone, records, std::dynamic_pointer_cast<SOARecordContent>(masterSOA));
  174. // this is actually an empty AXFR
  175. BOOST_CHECK_EQUAL(ret.size(), 1U);
  176. // nothing in the deletion part then
  177. BOOST_CHECK_EQUAL(ret.at(0).first.size(), 0U);
  178. // and the two SOAs in the addition part
  179. BOOST_CHECK_EQUAL(ret.at(0).second.size(), 2U);
  180. BOOST_CHECK_EQUAL(ret.at(0).second.at(0).d_type, QType(QType::SOA).getCode());
  181. BOOST_CHECK_EQUAL(ret.at(0).second.at(1).d_type, QType(QType::SOA).getCode());
  182. }
  183. BOOST_AUTO_TEST_CASE(test_ixfr_invalid_no_records) {
  184. const ComboAddress master("[2001:DB8::1]:53");
  185. const DNSName zone("JAIN.AD.JP.");
  186. auto masterSOA = DNSRecordContent::mastermake(QType::SOA, QClass::IN, "NS.JAIN.AD.JP. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  187. vector<DNSRecord> records;
  188. auto ret = processIXFRRecords(master, zone, records, std::dynamic_pointer_cast<SOARecordContent>(masterSOA));
  189. BOOST_CHECK_EQUAL(ret.size(), 0U);
  190. }
  191. BOOST_AUTO_TEST_CASE(test_ixfr_invalid_no_master_soa) {
  192. const ComboAddress master("[2001:DB8::1]:53");
  193. const DNSName zone("JAIN.AD.JP.");
  194. ;
  195. vector<DNSRecord> records;
  196. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  197. auto ret = processIXFRRecords(master, zone, records, nullptr);
  198. BOOST_CHECK_EQUAL(ret.size(), 0U);
  199. }
  200. BOOST_AUTO_TEST_CASE(test_ixfr_invalid_no_trailing_soa) {
  201. const ComboAddress master("[2001:DB8::1]:53");
  202. const DNSName zone("JAIN.AD.JP.");
  203. auto masterSOA = DNSRecordContent::mastermake(QType::SOA, QClass::IN, "NS.JAIN.AD.JP. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  204. vector<DNSRecord> records;
  205. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  206. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 1 600 600 3600000 604800");
  207. addRecordToList(records, DNSName("NEZU.JAIN.AD.JP."), QType::A, "133.69.136.5");
  208. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  209. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.3");
  210. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "192.41.197.2");
  211. BOOST_CHECK_THROW(processIXFRRecords(master, zone, records, std::dynamic_pointer_cast<SOARecordContent>(masterSOA)), std::runtime_error);
  212. }
  213. BOOST_AUTO_TEST_CASE(test_ixfr_invalid_no_soa_after_removals) {
  214. const ComboAddress master("[2001:DB8::1]:53");
  215. const DNSName zone("JAIN.AD.JP.");
  216. auto masterSOA = DNSRecordContent::mastermake(QType::SOA, QClass::IN, "NS.JAIN.AD.JP. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  217. vector<DNSRecord> records;
  218. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  219. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 1 600 600 3600000 604800");
  220. addRecordToList(records, DNSName("NEZU.JAIN.AD.JP."), QType::A, "133.69.136.5");
  221. BOOST_CHECK_THROW(processIXFRRecords(master, zone, records, std::dynamic_pointer_cast<SOARecordContent>(masterSOA)), std::runtime_error);
  222. }
  223. BOOST_AUTO_TEST_CASE(test_ixfr_mistmatching_serial_before_and_after_additions) {
  224. const ComboAddress master("[2001:DB8::1]:53");
  225. const DNSName zone("JAIN.AD.JP.");
  226. auto masterSOA = DNSRecordContent::mastermake(QType::SOA, QClass::IN, "NS.JAIN.AD.JP. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  227. vector<DNSRecord> records;
  228. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  229. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 1 600 600 3600000 604800");
  230. addRecordToList(records, DNSName("NEZU.JAIN.AD.JP."), QType::A, "133.69.136.5");
  231. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 2 600 600 3600000 604800");
  232. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.3");
  233. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "192.41.197.2");
  234. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  235. BOOST_CHECK_THROW(processIXFRRecords(master, zone, records, std::dynamic_pointer_cast<SOARecordContent>(masterSOA)), std::runtime_error);
  236. }
  237. BOOST_AUTO_TEST_CASE(test_ixfr_trailing_record_after_end) {
  238. const ComboAddress master("[2001:DB8::1]:53");
  239. const DNSName zone("JAIN.AD.JP.");
  240. auto masterSOA = DNSRecordContent::mastermake(QType::SOA, QClass::IN, "NS.JAIN.AD.JP. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  241. vector<DNSRecord> records;
  242. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  243. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 1 600 600 3600000 604800");
  244. addRecordToList(records, DNSName("NEZU.JAIN.AD.JP."), QType::A, "133.69.136.5");
  245. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  246. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.3");
  247. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "192.41.197.2");
  248. addRecordToList(records, DNSName("JAIN.AD.JP."), QType::SOA, "ns.jain.ad.jp. mohta.jain.ad.jp. 3 600 600 3600000 604800");
  249. addRecordToList(records, DNSName("JAIN-BB.JAIN.AD.JP."), QType::A, "133.69.136.3");
  250. BOOST_CHECK_THROW(processIXFRRecords(master, zone, records, std::dynamic_pointer_cast<SOARecordContent>(masterSOA)), std::runtime_error);
  251. }
  252. BOOST_AUTO_TEST_SUITE_END();