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.

netbase_tests.cpp 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. // Copyright (c) 2012-2016 The Starwels developers
  2. // Distributed under the MIT software license, see the accompanying
  3. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  4. #include "netbase.h"
  5. #include "test/test_starwels.h"
  6. #include "utilstrencodings.h"
  7. #include <string>
  8. #include <boost/test/unit_test.hpp>
  9. BOOST_FIXTURE_TEST_SUITE(netbase_tests, BasicTestingSetup)
  10. static CNetAddr ResolveIP(const char* ip)
  11. {
  12. CNetAddr addr;
  13. LookupHost(ip, addr, false);
  14. return addr;
  15. }
  16. static CSubNet ResolveSubNet(const char* subnet)
  17. {
  18. CSubNet ret;
  19. LookupSubNet(subnet, ret);
  20. return ret;
  21. }
  22. static CNetAddr CreateInternal(const char* host)
  23. {
  24. CNetAddr addr;
  25. addr.SetInternal(host);
  26. return addr;
  27. }
  28. BOOST_AUTO_TEST_CASE(netbase_networks)
  29. {
  30. BOOST_CHECK(ResolveIP("127.0.0.1").GetNetwork() == NET_UNROUTABLE);
  31. BOOST_CHECK(ResolveIP("::1").GetNetwork() == NET_UNROUTABLE);
  32. BOOST_CHECK(ResolveIP("8.8.8.8").GetNetwork() == NET_IPV4);
  33. BOOST_CHECK(ResolveIP("2001::8888").GetNetwork() == NET_IPV6);
  34. BOOST_CHECK(ResolveIP("FD87:D87E:EB43:edb1:8e4:3588:e546:35ca").GetNetwork() == NET_TOR);
  35. BOOST_CHECK(CreateInternal("foo.com").GetNetwork() == NET_INTERNAL);
  36. }
  37. BOOST_AUTO_TEST_CASE(netbase_properties)
  38. {
  39. BOOST_CHECK(ResolveIP("127.0.0.1").IsIPv4());
  40. BOOST_CHECK(ResolveIP("::FFFF:192.168.1.1").IsIPv4());
  41. BOOST_CHECK(ResolveIP("::1").IsIPv6());
  42. BOOST_CHECK(ResolveIP("10.0.0.1").IsRFC1918());
  43. BOOST_CHECK(ResolveIP("192.168.1.1").IsRFC1918());
  44. BOOST_CHECK(ResolveIP("172.31.255.255").IsRFC1918());
  45. BOOST_CHECK(ResolveIP("2001:0DB8::").IsRFC3849());
  46. BOOST_CHECK(ResolveIP("169.254.1.1").IsRFC3927());
  47. BOOST_CHECK(ResolveIP("2002::1").IsRFC3964());
  48. BOOST_CHECK(ResolveIP("FC00::").IsRFC4193());
  49. BOOST_CHECK(ResolveIP("2001::2").IsRFC4380());
  50. BOOST_CHECK(ResolveIP("2001:10::").IsRFC4843());
  51. BOOST_CHECK(ResolveIP("FE80::").IsRFC4862());
  52. BOOST_CHECK(ResolveIP("64:FF9B::").IsRFC6052());
  53. BOOST_CHECK(ResolveIP("FD87:D87E:EB43:edb1:8e4:3588:e546:35ca").IsTor());
  54. BOOST_CHECK(ResolveIP("127.0.0.1").IsLocal());
  55. BOOST_CHECK(ResolveIP("::1").IsLocal());
  56. BOOST_CHECK(ResolveIP("8.8.8.8").IsRoutable());
  57. BOOST_CHECK(ResolveIP("2001::1").IsRoutable());
  58. BOOST_CHECK(ResolveIP("127.0.0.1").IsValid());
  59. BOOST_CHECK(CreateInternal("FD6B:88C0:8724:edb1:8e4:3588:e546:35ca").IsInternal());
  60. BOOST_CHECK(CreateInternal("bar.com").IsInternal());
  61. }
  62. bool static TestSplitHost(std::string test, std::string host, int port)
  63. {
  64. std::string hostOut;
  65. int portOut = -1;
  66. SplitHostPort(test, portOut, hostOut);
  67. return hostOut == host && port == portOut;
  68. }
  69. BOOST_AUTO_TEST_CASE(netbase_splithost)
  70. {
  71. BOOST_CHECK(TestSplitHost("127.0.0.1", "127.0.0.1", -1));
  72. BOOST_CHECK(TestSplitHost("127.0.0.1:8343", "127.0.0.1", 8343));
  73. BOOST_CHECK(TestSplitHost("[127.0.0.1]", "127.0.0.1", -1));
  74. BOOST_CHECK(TestSplitHost("[127.0.0.1]:8343", "127.0.0.1", 8343));
  75. BOOST_CHECK(TestSplitHost("::ffff:127.0.0.1", "::ffff:127.0.0.1", -1));
  76. BOOST_CHECK(TestSplitHost("[::ffff:127.0.0.1]:8343", "::ffff:127.0.0.1", 8343));
  77. BOOST_CHECK(TestSplitHost("[::]:8343", "::", 8343));
  78. BOOST_CHECK(TestSplitHost("::8343", "::8343", -1));
  79. BOOST_CHECK(TestSplitHost(":8343", "", 8343));
  80. BOOST_CHECK(TestSplitHost("[]:8343", "", 8343));
  81. BOOST_CHECK(TestSplitHost("", "", -1));
  82. }
  83. bool static TestParse(std::string src, std::string canon)
  84. {
  85. CService addr(LookupNumeric(src.c_str(), 65535));
  86. return canon == addr.ToString();
  87. }
  88. BOOST_AUTO_TEST_CASE(netbase_lookupnumeric)
  89. {
  90. BOOST_CHECK(TestParse("127.0.0.1", "127.0.0.1:65535"));
  91. BOOST_CHECK(TestParse("127.0.0.1:8343", "127.0.0.1:8343"));
  92. BOOST_CHECK(TestParse("::ffff:127.0.0.1", "127.0.0.1:65535"));
  93. BOOST_CHECK(TestParse("::", "[::]:65535"));
  94. BOOST_CHECK(TestParse("[::]:8343", "[::]:8343"));
  95. BOOST_CHECK(TestParse("[127.0.0.1]", "127.0.0.1:65535"));
  96. BOOST_CHECK(TestParse(":::", "[::]:0"));
  97. // verify that an internal address fails to resolve
  98. BOOST_CHECK(TestParse("[fd6b:88c0:8724:1:2:3:4:5]", "[::]:0"));
  99. // and that a one-off resolves correctly
  100. BOOST_CHECK(TestParse("[fd6c:88c0:8724:1:2:3:4:5]", "[fd6c:88c0:8724:1:2:3:4:5]:65535"));
  101. }
  102. BOOST_AUTO_TEST_CASE(onioncat_test)
  103. {
  104. // values from https://web.archive.org/web/20121122003543/http://www.cypherpunk.at/onioncat/wiki/OnionCat
  105. CNetAddr addr1(ResolveIP("5wyqrzbvrdsumnok.onion"));
  106. CNetAddr addr2(ResolveIP("FD87:D87E:EB43:edb1:8e4:3588:e546:35ca"));
  107. BOOST_CHECK(addr1 == addr2);
  108. BOOST_CHECK(addr1.IsTor());
  109. BOOST_CHECK(addr1.ToStringIP() == "5wyqrzbvrdsumnok.onion");
  110. BOOST_CHECK(addr1.IsRoutable());
  111. }
  112. BOOST_AUTO_TEST_CASE(subnet_test)
  113. {
  114. BOOST_CHECK(ResolveSubNet("1.2.3.0/24") == ResolveSubNet("1.2.3.0/255.255.255.0"));
  115. BOOST_CHECK(ResolveSubNet("1.2.3.0/24") != ResolveSubNet("1.2.4.0/255.255.255.0"));
  116. BOOST_CHECK(ResolveSubNet("1.2.3.0/24").Match(ResolveIP("1.2.3.4")));
  117. BOOST_CHECK(!ResolveSubNet("1.2.2.0/24").Match(ResolveIP("1.2.3.4")));
  118. BOOST_CHECK(ResolveSubNet("1.2.3.4").Match(ResolveIP("1.2.3.4")));
  119. BOOST_CHECK(ResolveSubNet("1.2.3.4/32").Match(ResolveIP("1.2.3.4")));
  120. BOOST_CHECK(!ResolveSubNet("1.2.3.4").Match(ResolveIP("5.6.7.8")));
  121. BOOST_CHECK(!ResolveSubNet("1.2.3.4/32").Match(ResolveIP("5.6.7.8")));
  122. BOOST_CHECK(ResolveSubNet("::ffff:127.0.0.1").Match(ResolveIP("127.0.0.1")));
  123. BOOST_CHECK(ResolveSubNet("1:2:3:4:5:6:7:8").Match(ResolveIP("1:2:3:4:5:6:7:8")));
  124. BOOST_CHECK(!ResolveSubNet("1:2:3:4:5:6:7:8").Match(ResolveIP("1:2:3:4:5:6:7:9")));
  125. BOOST_CHECK(ResolveSubNet("1:2:3:4:5:6:7:0/112").Match(ResolveIP("1:2:3:4:5:6:7:1234")));
  126. BOOST_CHECK(ResolveSubNet("192.168.0.1/24").Match(ResolveIP("192.168.0.2")));
  127. BOOST_CHECK(ResolveSubNet("192.168.0.20/29").Match(ResolveIP("192.168.0.18")));
  128. BOOST_CHECK(ResolveSubNet("1.2.2.1/24").Match(ResolveIP("1.2.2.4")));
  129. BOOST_CHECK(ResolveSubNet("1.2.2.110/31").Match(ResolveIP("1.2.2.111")));
  130. BOOST_CHECK(ResolveSubNet("1.2.2.20/26").Match(ResolveIP("1.2.2.63")));
  131. // All-Matching IPv6 Matches arbitrary IPv4 and IPv6
  132. BOOST_CHECK(ResolveSubNet("::/0").Match(ResolveIP("1:2:3:4:5:6:7:1234")));
  133. BOOST_CHECK(ResolveSubNet("::/0").Match(ResolveIP("1.2.3.4")));
  134. // All-Matching IPv4 does not Match IPv6
  135. BOOST_CHECK(!ResolveSubNet("0.0.0.0/0").Match(ResolveIP("1:2:3:4:5:6:7:1234")));
  136. // Invalid subnets Match nothing (not even invalid addresses)
  137. BOOST_CHECK(!CSubNet().Match(ResolveIP("1.2.3.4")));
  138. BOOST_CHECK(!ResolveSubNet("").Match(ResolveIP("4.5.6.7")));
  139. BOOST_CHECK(!ResolveSubNet("bloop").Match(ResolveIP("0.0.0.0")));
  140. BOOST_CHECK(!ResolveSubNet("bloop").Match(ResolveIP("hab")));
  141. // Check valid/invalid
  142. BOOST_CHECK(ResolveSubNet("1.2.3.0/0").IsValid());
  143. BOOST_CHECK(!ResolveSubNet("1.2.3.0/-1").IsValid());
  144. BOOST_CHECK(ResolveSubNet("1.2.3.0/32").IsValid());
  145. BOOST_CHECK(!ResolveSubNet("1.2.3.0/33").IsValid());
  146. BOOST_CHECK(ResolveSubNet("1:2:3:4:5:6:7:8/0").IsValid());
  147. BOOST_CHECK(ResolveSubNet("1:2:3:4:5:6:7:8/33").IsValid());
  148. BOOST_CHECK(!ResolveSubNet("1:2:3:4:5:6:7:8/-1").IsValid());
  149. BOOST_CHECK(ResolveSubNet("1:2:3:4:5:6:7:8/128").IsValid());
  150. BOOST_CHECK(!ResolveSubNet("1:2:3:4:5:6:7:8/129").IsValid());
  151. BOOST_CHECK(!ResolveSubNet("fuzzy").IsValid());
  152. //CNetAddr constructor test
  153. BOOST_CHECK(CSubNet(ResolveIP("127.0.0.1")).IsValid());
  154. BOOST_CHECK(CSubNet(ResolveIP("127.0.0.1")).Match(ResolveIP("127.0.0.1")));
  155. BOOST_CHECK(!CSubNet(ResolveIP("127.0.0.1")).Match(ResolveIP("127.0.0.2")));
  156. BOOST_CHECK(CSubNet(ResolveIP("127.0.0.1")).ToString() == "127.0.0.1/32");
  157. CSubNet subnet = CSubNet(ResolveIP("1.2.3.4"), 32);
  158. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.4/32");
  159. subnet = CSubNet(ResolveIP("1.2.3.4"), 8);
  160. BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/8");
  161. subnet = CSubNet(ResolveIP("1.2.3.4"), 0);
  162. BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/0");
  163. subnet = CSubNet(ResolveIP("1.2.3.4"), ResolveIP("255.255.255.255"));
  164. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.4/32");
  165. subnet = CSubNet(ResolveIP("1.2.3.4"), ResolveIP("255.0.0.0"));
  166. BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/8");
  167. subnet = CSubNet(ResolveIP("1.2.3.4"), ResolveIP("0.0.0.0"));
  168. BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/0");
  169. BOOST_CHECK(CSubNet(ResolveIP("1:2:3:4:5:6:7:8")).IsValid());
  170. BOOST_CHECK(CSubNet(ResolveIP("1:2:3:4:5:6:7:8")).Match(ResolveIP("1:2:3:4:5:6:7:8")));
  171. BOOST_CHECK(!CSubNet(ResolveIP("1:2:3:4:5:6:7:8")).Match(ResolveIP("1:2:3:4:5:6:7:9")));
  172. BOOST_CHECK(CSubNet(ResolveIP("1:2:3:4:5:6:7:8")).ToString() == "1:2:3:4:5:6:7:8/128");
  173. subnet = ResolveSubNet("1.2.3.4/255.255.255.255");
  174. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.4/32");
  175. subnet = ResolveSubNet("1.2.3.4/255.255.255.254");
  176. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.4/31");
  177. subnet = ResolveSubNet("1.2.3.4/255.255.255.252");
  178. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.4/30");
  179. subnet = ResolveSubNet("1.2.3.4/255.255.255.248");
  180. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.0/29");
  181. subnet = ResolveSubNet("1.2.3.4/255.255.255.240");
  182. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.0/28");
  183. subnet = ResolveSubNet("1.2.3.4/255.255.255.224");
  184. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.0/27");
  185. subnet = ResolveSubNet("1.2.3.4/255.255.255.192");
  186. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.0/26");
  187. subnet = ResolveSubNet("1.2.3.4/255.255.255.128");
  188. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.0/25");
  189. subnet = ResolveSubNet("1.2.3.4/255.255.255.0");
  190. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.0/24");
  191. subnet = ResolveSubNet("1.2.3.4/255.255.254.0");
  192. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.2.0/23");
  193. subnet = ResolveSubNet("1.2.3.4/255.255.252.0");
  194. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/22");
  195. subnet = ResolveSubNet("1.2.3.4/255.255.248.0");
  196. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/21");
  197. subnet = ResolveSubNet("1.2.3.4/255.255.240.0");
  198. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/20");
  199. subnet = ResolveSubNet("1.2.3.4/255.255.224.0");
  200. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/19");
  201. subnet = ResolveSubNet("1.2.3.4/255.255.192.0");
  202. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/18");
  203. subnet = ResolveSubNet("1.2.3.4/255.255.128.0");
  204. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/17");
  205. subnet = ResolveSubNet("1.2.3.4/255.255.0.0");
  206. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/16");
  207. subnet = ResolveSubNet("1.2.3.4/255.254.0.0");
  208. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/15");
  209. subnet = ResolveSubNet("1.2.3.4/255.252.0.0");
  210. BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/14");
  211. subnet = ResolveSubNet("1.2.3.4/255.248.0.0");
  212. BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/13");
  213. subnet = ResolveSubNet("1.2.3.4/255.240.0.0");
  214. BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/12");
  215. subnet = ResolveSubNet("1.2.3.4/255.224.0.0");
  216. BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/11");
  217. subnet = ResolveSubNet("1.2.3.4/255.192.0.0");
  218. BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/10");
  219. subnet = ResolveSubNet("1.2.3.4/255.128.0.0");
  220. BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/9");
  221. subnet = ResolveSubNet("1.2.3.4/255.0.0.0");
  222. BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/8");
  223. subnet = ResolveSubNet("1.2.3.4/254.0.0.0");
  224. BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/7");
  225. subnet = ResolveSubNet("1.2.3.4/252.0.0.0");
  226. BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/6");
  227. subnet = ResolveSubNet("1.2.3.4/248.0.0.0");
  228. BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/5");
  229. subnet = ResolveSubNet("1.2.3.4/240.0.0.0");
  230. BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/4");
  231. subnet = ResolveSubNet("1.2.3.4/224.0.0.0");
  232. BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/3");
  233. subnet = ResolveSubNet("1.2.3.4/192.0.0.0");
  234. BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/2");
  235. subnet = ResolveSubNet("1.2.3.4/128.0.0.0");
  236. BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/1");
  237. subnet = ResolveSubNet("1.2.3.4/0.0.0.0");
  238. BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/0");
  239. subnet = ResolveSubNet("1:2:3:4:5:6:7:8/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff");
  240. BOOST_CHECK_EQUAL(subnet.ToString(), "1:2:3:4:5:6:7:8/128");
  241. subnet = ResolveSubNet("1:2:3:4:5:6:7:8/ffff:0000:0000:0000:0000:0000:0000:0000");
  242. BOOST_CHECK_EQUAL(subnet.ToString(), "1::/16");
  243. subnet = ResolveSubNet("1:2:3:4:5:6:7:8/0000:0000:0000:0000:0000:0000:0000:0000");
  244. BOOST_CHECK_EQUAL(subnet.ToString(), "::/0");
  245. subnet = ResolveSubNet("1.2.3.4/255.255.232.0");
  246. BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/255.255.232.0");
  247. subnet = ResolveSubNet("1:2:3:4:5:6:7:8/ffff:ffff:ffff:fffe:ffff:ffff:ffff:ff0f");
  248. BOOST_CHECK_EQUAL(subnet.ToString(), "1:2:3:4:5:6:7:8/ffff:ffff:ffff:fffe:ffff:ffff:ffff:ff0f");
  249. }
  250. BOOST_AUTO_TEST_CASE(netbase_getgroup)
  251. {
  252. BOOST_CHECK(ResolveIP("127.0.0.1").GetGroup() == std::vector<unsigned char>({0})); // Local -> !Routable()
  253. BOOST_CHECK(ResolveIP("257.0.0.1").GetGroup() == std::vector<unsigned char>({0})); // !Valid -> !Routable()
  254. BOOST_CHECK(ResolveIP("10.0.0.1").GetGroup() == std::vector<unsigned char>({0})); // RFC1918 -> !Routable()
  255. BOOST_CHECK(ResolveIP("169.254.1.1").GetGroup() == std::vector<unsigned char>({0})); // RFC3927 -> !Routable()
  256. BOOST_CHECK(ResolveIP("1.2.3.4").GetGroup() == std::vector<unsigned char>({(unsigned char)NET_IPV4, 1, 2})); // IPv4
  257. BOOST_CHECK(ResolveIP("::FFFF:0:102:304").GetGroup() == std::vector<unsigned char>({(unsigned char)NET_IPV4, 1, 2})); // RFC6145
  258. BOOST_CHECK(ResolveIP("64:FF9B::102:304").GetGroup() == std::vector<unsigned char>({(unsigned char)NET_IPV4, 1, 2})); // RFC6052
  259. BOOST_CHECK(ResolveIP("2002:102:304:9999:9999:9999:9999:9999").GetGroup() == std::vector<unsigned char>({(unsigned char)NET_IPV4, 1, 2})); // RFC3964
  260. BOOST_CHECK(ResolveIP("2001:0:9999:9999:9999:9999:FEFD:FCFB").GetGroup() == std::vector<unsigned char>({(unsigned char)NET_IPV4, 1, 2})); // RFC4380
  261. BOOST_CHECK(ResolveIP("FD87:D87E:EB43:edb1:8e4:3588:e546:35ca").GetGroup() == std::vector<unsigned char>({(unsigned char)NET_TOR, 239})); // Tor
  262. BOOST_CHECK(ResolveIP("2001:470:abcd:9999:9999:9999:9999:9999").GetGroup() == std::vector<unsigned char>({(unsigned char)NET_IPV6, 32, 1, 4, 112, 175})); //he.net
  263. BOOST_CHECK(ResolveIP("2001:2001:9999:9999:9999:9999:9999:9999").GetGroup() == std::vector<unsigned char>({(unsigned char)NET_IPV6, 32, 1, 32, 1})); //IPv6
  264. // baz.net sha256 hash: 12929400eb4607c4ac075f087167e75286b179c693eb059a01774b864e8fe505
  265. std::vector<unsigned char> internal_group = {NET_INTERNAL, 0x12, 0x92, 0x94, 0x00, 0xeb, 0x46, 0x07, 0xc4, 0xac, 0x07};
  266. BOOST_CHECK(CreateInternal("baz.net").GetGroup() == internal_group);
  267. }
  268. BOOST_AUTO_TEST_SUITE_END()