blob: 817f149d4e47f7a2bdcad5cb5160f389c3081b3a [file] [log] [blame]
akmhoque3d06e792014-05-27 16:23:20 -05001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -05002/**
akmhoque3d06e792014-05-27 16:23:20 -05003 * Copyright (c) 2014 University of Memphis,
4 * Regents of the University of California
5 *
6 * This file is part of NLSR (Named-data Link State Routing).
7 * See AUTHORS.md for complete list of NLSR authors and contributors.
8 *
9 * NLSR is free software: you can redistribute it and/or modify it under the terms
10 * of the GNU General Public License as published by the Free Software Foundation,
11 * either version 3 of the License, or (at your option) any later version.
12 *
13 * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
14 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along with
18 * NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * \author Ashlesh Gawande <agawande@memphis.edu>
21 *
22 **/
Vince Lehman7c603292014-09-11 17:48:16 -050023
24#include "test-common.hpp"
Vince Lehman904c2412014-09-23 19:36:11 -050025#include "dummy-face.hpp"
Muktadir R Chowdhurybfa27602014-10-31 10:57:41 -050026#include "logger.hpp"
Vince Lehman7c603292014-09-11 17:48:16 -050027
akmhoque157b0a42014-05-13 00:26:37 -050028#include <fstream>
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -050029#include "conf-file-processor.hpp"
30#include "nlsr.hpp"
Muktadir R Chowdhurybfa27602014-10-31 10:57:41 -050031
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -050032#include <boost/test/unit_test.hpp>
Muktadir R Chowdhurybfa27602014-10-31 10:57:41 -050033#include <boost/filesystem.hpp>
34#include <boost/algorithm/string.hpp>
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -050035
36namespace nlsr {
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -050037namespace test {
38
Vince Lehman904c2412014-09-23 19:36:11 -050039using ndn::DummyFace;
40using ndn::shared_ptr;
41
Vince Lehman7b616582014-10-17 16:25:39 -050042const std::string SECTION_GENERAL =
43 "general\n"
44 "{\n"
45 " network /ndn/\n"
46 " site /memphis.edu/\n"
47 " router /cs/pollux/\n"
48 " lsa-refresh-time 1800\n"
49 " lsa-interest-lifetime 3\n"
Alexander Afanasyev1cf1e102014-08-17 19:47:57 -070050 " router-dead-interval 86400\n"
Vince Lehman7b616582014-10-17 16:25:39 -050051 " log-level INFO\n"
52 " log-dir /tmp\n"
53 " seq-dir /tmp\n"
54 "}\n\n";
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -050055
Muktadir R Chowdhurybfa27602014-10-31 10:57:41 -050056const std::string LOG4CXX_PLACEHOLDER = "$LOG4CXX$";
57
58const std::string SECTION_GENERAL_WITH_LOG4CXX =
59 "general\n"
60 "{\n"
61 " network /ndn/\n"
62 " site /memphis.edu/\n"
63 " router /cs/pollux/\n"
64 " lsa-refresh-time 1800\n"
65 " lsa-interest-lifetime 3\n"
66 " router-dead-interval 86400\n"
67 " log-level INFO\n"
68 " log-dir /tmp\n"
69 " seq-dir /tmp\n"
70 " log4cxx-conf " + LOG4CXX_PLACEHOLDER + "\n"
71 "}\n\n";
72
Vince Lehman7b616582014-10-17 16:25:39 -050073const std::string SECTION_NEIGHBORS =
74 "neighbors\n"
75 "{\n"
76 " hello-retries 3\n"
77 " hello-timeout 1\n"
78 " hello-interval 60\n\n"
79 " adj-lsa-build-interval 3\n"
80 " first-hello-interval 6\n"
81 " neighbor\n"
82 " {\n"
83 " name /ndn/memphis.edu/cs/castor\n"
84 " face-uri udp4://localhost\n"
85 " link-cost 20\n"
86 " }\n\n"
87 " neighbor\n"
88 " {\n"
89 " name /ndn/memphis.edu/cs/mira\n"
90 " face-uri udp4://localhost\n"
91 " link-cost 30\n"
92 " }\n"
93 "}\n\n";
94
95const std::string SECTION_HYPERBOLIC_ON =
96 "hyperbolic\n"
97 "{\n"
98 " state on\n"
99 " radius 123.456\n"
100 " angle 1.45\n"
101 "}\n\n";
102
103const std::string SECTION_HYPERBOLIC_OFF =
104 "hyperbolic\n"
105 "{\n"
106 " state off\n"
107 " radius 123.456\n"
108 " angle 1.45\n"
109 "}\n\n";
110
111const std::string SECTION_FIB =
112 "fib\n"
113 "{\n"
114 " max-faces-per-prefix 3\n"
115 " routing-calc-interval 9\n"
116 "}\n\n";
117
118const std::string SECTION_ADVERTISING =
119 "advertising\n"
120 "{\n"
121 " prefix /ndn/edu/memphis/cs/netlab\n"
122 " prefix /ndn/edu/memphis/sports/basketball\n"
123 "}\n";
124
125const std::string CONFIG_LINK_STATE = SECTION_GENERAL + SECTION_NEIGHBORS +
126 SECTION_HYPERBOLIC_OFF + SECTION_FIB + SECTION_ADVERTISING;
127
Muktadir R Chowdhurybfa27602014-10-31 10:57:41 -0500128const std::string CONFIG_LOG4CXX = SECTION_GENERAL_WITH_LOG4CXX;
129
Vince Lehman7b616582014-10-17 16:25:39 -0500130const std::string CONFIG_HYPERBOLIC = SECTION_GENERAL + SECTION_NEIGHBORS +
131 SECTION_HYPERBOLIC_ON + SECTION_FIB + SECTION_ADVERTISING;
132
133class ConfFileProcessorFixture : public BaseFixture
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -0500134{
Vince Lehman7b616582014-10-17 16:25:39 -0500135public:
136 ConfFileProcessorFixture()
137 : face(ndn::makeDummyFace())
138 , nlsr(g_ioService, g_scheduler, ndn::ref(*face))
139 , CONFIG_FILE("unit-test-nlsr.conf")
Muktadir R Chowdhurybfa27602014-10-31 10:57:41 -0500140 , m_logConfigFileName(boost::filesystem::unique_path().native())
141 , m_logFileName(boost::filesystem::unique_path().native())
Vince Lehman7b616582014-10-17 16:25:39 -0500142 {
143 }
Vince Lehman904c2412014-09-23 19:36:11 -0500144
Vince Lehman7b616582014-10-17 16:25:39 -0500145 ~ConfFileProcessorFixture()
146 {
147 remove("unit-test-nlsr.conf");
Muktadir R Chowdhurybfa27602014-10-31 10:57:41 -0500148 remove("/tmp/unit-test-log4cxx.xml");
149
150 boost::filesystem::remove(boost::filesystem::path(getLogConfigFileName()));
151 boost::filesystem::remove(boost::filesystem::path(getLogFileName()));
Vince Lehman7b616582014-10-17 16:25:39 -0500152 }
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -0500153
Vince Lehman7b616582014-10-17 16:25:39 -0500154 bool processConfigurationString(std::string confString)
155 {
156 std::ofstream config;
157 config.open("unit-test-nlsr.conf");
158 config << confString;
159 config.close();
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -0500160
Vince Lehman7b616582014-10-17 16:25:39 -0500161 ConfFileProcessor processor(nlsr, CONFIG_FILE);
162 return processor.processConfFile();
163 }
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -0500164
Muktadir R Chowdhurybfa27602014-10-31 10:57:41 -0500165 void
166 verifyOutputLog4cxx(const std::string expected[], size_t nExpected)
167 {
168 std::ifstream is(getLogFileName().c_str());
169 std::string buffer((std::istreambuf_iterator<char>(is)),
170 (std::istreambuf_iterator<char>()));
171
172 std::vector<std::string> components;
173 boost::split(components, buffer, boost::is_any_of(" ,\n"));
174
175 // expected + number of timestamps (one per log statement) + trailing newline of last statement
176 BOOST_REQUIRE_EQUAL(components.size(), nExpected);
177
178 for (size_t i = 0; i < nExpected; ++i) {
179 if (expected[i] == "")
180 continue;
181
182 BOOST_CHECK_EQUAL(components[i], expected[i]);
183 }
184 }
185
186 const std::string&
187 getLogConfigFileName()
188 {
189 return m_logConfigFileName;
190 }
191
192 const std::string&
193 getLogFileName()
194 {
195 return m_logFileName;
196 }
197
alvya2228c62014-12-09 10:25:11 -0600198 void
199 commentOut(const std::string& key, std::string& config)
200 {
201 boost::replace_all(config, key, ";" + key);
202 }
203
Vince Lehman7b616582014-10-17 16:25:39 -0500204public:
205 shared_ptr<ndn::DummyFace> face;
206 Nlsr nlsr;
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -0500207
Vince Lehman7b616582014-10-17 16:25:39 -0500208private:
209 const std::string CONFIG_FILE;
Muktadir R Chowdhurybfa27602014-10-31 10:57:41 -0500210 std::string m_logConfigFileName;
211 std::string m_logFileName;
Vince Lehman7b616582014-10-17 16:25:39 -0500212};
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -0500213
Vince Lehman7b616582014-10-17 16:25:39 -0500214BOOST_FIXTURE_TEST_SUITE(TestConfFileProcessor, ConfFileProcessorFixture)
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -0500215
Vince Lehman7b616582014-10-17 16:25:39 -0500216BOOST_AUTO_TEST_CASE(LinkState)
217{
218 processConfigurationString(CONFIG_LINK_STATE);
Vince Lehman7b616582014-10-17 16:25:39 -0500219 ConfParameter& conf = nlsr.getConfParameter();
220 conf.buildRouterPrefix();
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -0500221
Vince Lehman7b616582014-10-17 16:25:39 -0500222 // General
223 BOOST_CHECK_EQUAL(conf.getNetwork(), "/ndn/");
224 BOOST_CHECK_EQUAL(conf.getSiteName(), "/memphis.edu/");
225 BOOST_CHECK_EQUAL(conf.getRouterName(), "/cs/pollux/");
226 BOOST_CHECK_EQUAL(conf.getRouterPrefix(), "/ndn/memphis.edu/cs/pollux/");
227 BOOST_CHECK_EQUAL(conf.getChronosyncPrefix(), "/ndn/NLSR/sync");
228 BOOST_CHECK_EQUAL(conf.getLsaPrefix(), "/ndn/NLSR/LSA");
229 BOOST_CHECK_EQUAL(conf.getLsaRefreshTime(), 1800);
230 BOOST_CHECK_EQUAL(conf.getLsaInterestLifetime(), ndn::time::seconds(3));
Alexander Afanasyev1cf1e102014-08-17 19:47:57 -0700231 BOOST_CHECK_EQUAL(conf.getRouterDeadInterval(), 86400);
Vince Lehman7b616582014-10-17 16:25:39 -0500232 BOOST_CHECK_EQUAL(conf.getLogLevel(), "INFO");
233 BOOST_CHECK_EQUAL(conf.getLogDir(), "/tmp");
234 BOOST_CHECK_EQUAL(conf.getSeqFileDir(), "/tmp");
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700235
Vince Lehman7b616582014-10-17 16:25:39 -0500236 // Neighbors
237 BOOST_CHECK_EQUAL(conf.getInterestRetryNumber(), 3);
238 BOOST_CHECK_EQUAL(conf.getInterestResendTime(), 1);
239 BOOST_CHECK_EQUAL(conf.getInfoInterestInterval(), 60);
240
241 BOOST_CHECK_EQUAL(conf.getAdjLsaBuildInterval(), 3);
242 BOOST_CHECK_EQUAL(conf.getFirstHelloInterval(), 6);
243
244 BOOST_CHECK(nlsr.getAdjacencyList().isNeighbor("/ndn/memphis.edu/cs/mira"));
245 BOOST_CHECK(nlsr.getAdjacencyList().isNeighbor("/ndn/memphis.edu/cs/castor"));
246 BOOST_CHECK(!nlsr.getAdjacencyList().isNeighbor("/ndn/memphis.edu/cs/fail"));
247
248 Adjacent mira = nlsr.getAdjacencyList().getAdjacent("/ndn/memphis.edu/cs/mira");
249 BOOST_CHECK_EQUAL(mira.getName(), "/ndn/memphis.edu/cs/mira");
250 BOOST_CHECK_EQUAL(mira.getLinkCost(), 30);
251
252 Adjacent castor = nlsr.getAdjacencyList().getAdjacent("/ndn/memphis.edu/cs/castor");
253 BOOST_CHECK_EQUAL(castor.getName(), "/ndn/memphis.edu/cs/castor");
254 BOOST_CHECK_EQUAL(castor.getLinkCost(), 20);
255
256 // Hyperbolic
257 BOOST_CHECK_EQUAL(conf.getHyperbolicState(), 0);
258
259 // FIB
260 BOOST_CHECK_EQUAL(conf.getMaxFacesPerPrefix(), 3);
261 BOOST_CHECK_EQUAL(conf.getRoutingCalcInterval(), 9);
262
263 // Advertising
264 BOOST_CHECK_EQUAL(nlsr.getNamePrefixList().getSize(), 2);
265}
266
Muktadir R Chowdhurybfa27602014-10-31 10:57:41 -0500267BOOST_AUTO_TEST_CASE(Log4cxxFileExists)
268{
269 std::string configPath = boost::filesystem::unique_path().native();
270
271 std::ofstream log4cxxConfFile;
272 log4cxxConfFile.open(configPath);
273 log4cxxConfFile.close();
274
275 std::string config = CONFIG_LOG4CXX;
276 boost::replace_all(config, LOG4CXX_PLACEHOLDER, configPath);
277
278 BOOST_CHECK_EQUAL(processConfigurationString(config), true);
279
280 ConfParameter& conf = nlsr.getConfParameter();
281 BOOST_CHECK_EQUAL(conf.getLog4CxxConfPath(), configPath);
282 BOOST_CHECK_EQUAL(conf.isLog4CxxConfAvailable(), true);
283
284 boost::filesystem::remove(boost::filesystem::path(configPath));
285}
286
287BOOST_AUTO_TEST_CASE(Log4cxxFileDoesNotExist)
288{
289 std::string configPath = boost::filesystem::unique_path().native();
290
291 std::string config = CONFIG_LOG4CXX;
292 boost::replace_all(config, LOG4CXX_PLACEHOLDER, configPath);
293
294 BOOST_CHECK_EQUAL(processConfigurationString(config), false);
295}
296
297BOOST_AUTO_TEST_CASE(Log4cxxNoValue)
298{
299 std::string config = CONFIG_LOG4CXX;
300 boost::replace_all(config, LOG4CXX_PLACEHOLDER, "");
301
302 BOOST_CHECK_EQUAL(processConfigurationString(config), false);
303}
304
305BOOST_AUTO_TEST_CASE(Log4cxxTestCase)
306{
307 {
308 std::ofstream of(getLogConfigFileName().c_str());
309 of << "log4j.rootLogger=TRACE, FILE\n"
310 << "log4j.appender.FILE=org.apache.log4j.FileAppender\n"
311 << "log4j.appender.FILE.layout=org.apache.log4j.PatternLayout\n"
312 << "log4j.appender.FILE.File=" << getLogFileName() << "\n"
313 << "log4j.appender.FILE.ImmediateFlush=true\n"
314 << "log4j.appender.FILE.layout.ConversionPattern=%d{HH:mm:ss} %p %c{1} - %m%n\n";
315 }
316
317 INIT_LOG4CXX(getLogConfigFileName());
318
319 INIT_LOGGER("DefaultConfig");
320
321 _LOG_TRACE("trace-message-JHGFDSR^1");
322 _LOG_DEBUG("debug-message-IGg2474fdksd-fo-" << 15 << 16 << 17);
323 _LOG_INFO("info-message-Jjxjshj13");
324 _LOG_WARN("warning-message-XXXhdhd11" << 1 <<"x");
325 _LOG_ERROR("error-message-!#$&^%$#@");
326 _LOG_FATAL("fatal-message-JJSjaamcng");
327
328 const std::string EXPECTED[] =
329 {
330 "", "TRACE", "DefaultConfig", "-", "trace-message-JHGFDSR^1",
331 "", "DEBUG", "DefaultConfig", "-", "debug-message-IGg2474fdksd-fo-151617",
332 "", "INFO", "DefaultConfig", "-", "info-message-Jjxjshj13",
333 "", "WARN", "DefaultConfig", "-", "warning-message-XXXhdhd111x",
334 "", "ERROR", "DefaultConfig", "-", "error-message-!#$&^%$#@",
335 "", "FATAL", "DefaultConfig", "-", "fatal-message-JJSjaamcng",
336 "",
337 };
338
339 verifyOutputLog4cxx(EXPECTED, sizeof(EXPECTED) / sizeof(std::string));
340}
341
alvy2fe12872014-11-25 10:32:23 -0600342BOOST_AUTO_TEST_CASE(MalformedUri)
343{
344 const std::string MALFORMED_URI =
345 "neighbors\n"
346 "{\n"
347 " hello-retries 3\n"
348 " hello-timeout 1\n"
349 " hello-interval 60\n\n"
350 " adj-lsa-build-interval 3\n"
351 " first-hello-interval 6\n"
352 " neighbor\n"
353 " {\n"
354 " name /ndn/memphis.edu/cs/castor\n"
355 " face-uri udp4:malformed-uri\n"
356 " link-cost 20\n"
357 " }\n"
358 "}\n\n";
359
360 BOOST_CHECK_EQUAL(processConfigurationString(MALFORMED_URI), false);
361}
362
Vince Lehman7b616582014-10-17 16:25:39 -0500363BOOST_AUTO_TEST_CASE(Hyperbolic)
364{
365 processConfigurationString(CONFIG_HYPERBOLIC);
366
367 ConfParameter& conf = nlsr.getConfParameter();
368 BOOST_CHECK_EQUAL(conf.getHyperbolicState(), 1);
369 BOOST_CHECK_EQUAL(conf.getCorR(), 123.456);
370 BOOST_CHECK_EQUAL(conf.getCorTheta(), 1.45);
371}
372
alvya2228c62014-12-09 10:25:11 -0600373BOOST_AUTO_TEST_CASE(DefaultValuesGeneral)
Vince Lehman7b616582014-10-17 16:25:39 -0500374{
alvya2228c62014-12-09 10:25:11 -0600375 std::string config = SECTION_GENERAL;
Vince Lehman7b616582014-10-17 16:25:39 -0500376
alvya2228c62014-12-09 10:25:11 -0600377 commentOut("lsa-refresh-time", config);
378 commentOut("lsa-interest-lifetime", config);
379 commentOut("router-dead-interval", config);
380
381 BOOST_CHECK_EQUAL(processConfigurationString(config), true);
Vince Lehman7b616582014-10-17 16:25:39 -0500382
383 ConfParameter& conf = nlsr.getConfParameter();
384
alvy5a454952014-12-15 12:49:54 -0600385 BOOST_CHECK_EQUAL(conf.getLsaRefreshTime(), static_cast<uint32_t>(LSA_REFRESH_TIME_DEFAULT));
alvya2228c62014-12-09 10:25:11 -0600386 BOOST_CHECK_EQUAL(conf.getLsaInterestLifetime(),
387 static_cast<ndn::time::seconds>(LSA_INTEREST_LIFETIME_DEFAULT));
388 BOOST_CHECK_EQUAL(conf.getRouterDeadInterval(), (2*conf.getLsaRefreshTime()));
389}
390
391BOOST_AUTO_TEST_CASE(DefaultValuesNeighbors)
392{
393 std::string config = SECTION_NEIGHBORS;
394
395 commentOut("hello-retries", config);
396 commentOut("hello-timeout", config);
397 commentOut("hello-interval", config);
398 commentOut("first-hello-interval", config);
399 commentOut("adj-lsa-build-interval", config);
400
401 BOOST_CHECK_EQUAL(processConfigurationString(config), true);
402
403 ConfParameter& conf = nlsr.getConfParameter();
404
405 BOOST_CHECK_EQUAL(conf.getInterestRetryNumber(), static_cast<uint32_t>(HELLO_RETRIES_DEFAULT));
alvy5a454952014-12-15 12:49:54 -0600406 BOOST_CHECK_EQUAL(conf.getInterestResendTime(), static_cast<uint32_t>(HELLO_TIMEOUT_DEFAULT));
407 BOOST_CHECK_EQUAL(conf.getInfoInterestInterval(), static_cast<uint32_t>(HELLO_INTERVAL_DEFAULT));
alvya2228c62014-12-09 10:25:11 -0600408 BOOST_CHECK_EQUAL(conf.getFirstHelloInterval(),
409 static_cast<uint32_t>(FIRST_HELLO_INTERVAL_DEFAULT));
Vince Lehman7b616582014-10-17 16:25:39 -0500410 BOOST_CHECK_EQUAL(conf.getAdjLsaBuildInterval(),
411 static_cast<uint32_t>(ADJ_LSA_BUILD_INTERVAL_DEFAULT));
alvya2228c62014-12-09 10:25:11 -0600412}
Vince Lehman7b616582014-10-17 16:25:39 -0500413
alvya2228c62014-12-09 10:25:11 -0600414BOOST_AUTO_TEST_CASE(DefaultValuesFib)
415{
416 std::string config = SECTION_FIB;
417
418 commentOut("max-faces-per-prefix", config);
419 commentOut("routing-calc-interval", config);
420
421 BOOST_CHECK_EQUAL(processConfigurationString(config), true);
422
423 ConfParameter& conf = nlsr.getConfParameter();
424
425 BOOST_CHECK_EQUAL(conf.getMaxFacesPerPrefix(),
426 static_cast<uint32_t>(MAX_FACES_PER_PREFIX_DEFAULT));
427 BOOST_CHECK_EQUAL(conf.getRoutingCalcInterval(),
428 static_cast<uint32_t>(ROUTING_CALC_INTERVAL_DEFAULT));
429}
430
431BOOST_AUTO_TEST_CASE(DefaultValuesHyperbolic)
432{
433 std::string config = SECTION_HYPERBOLIC_ON;
434
435 commentOut("state", config);
436
437 BOOST_CHECK_EQUAL(processConfigurationString(config), true);
438
439 ConfParameter& conf = nlsr.getConfParameter();
440
441 BOOST_CHECK_EQUAL(conf.getHyperbolicState(), static_cast<int32_t>(HYPERBOLIC_STATE_DEFAULT));
Vince Lehman7b616582014-10-17 16:25:39 -0500442}
443
444BOOST_AUTO_TEST_CASE(OutOfRangeValue)
445{
446 const std::string SECTION_FIB_OUT_OF_RANGE =
447 "fib\n"
448 "{\n"
449 " max-faces-per-prefix 3\n"
450 " routing-calc-interval 999\n" // Larger than max value
451 "}\n\n";
452
453 // Processing should fail due to out of range value
454 BOOST_CHECK_EQUAL(processConfigurationString(SECTION_FIB_OUT_OF_RANGE), false);
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -0500455}
456
alvy5a454952014-12-15 12:49:54 -0600457BOOST_AUTO_TEST_CASE(NegativeValue)
458{
459 const std::string SECTION_GENERAL_NEGATIVE_VALUE =
460 "general\n"
461 "{\n"
462 " network /ndn/\n"
463 " site /memphis.edu/\n"
464 " router /cs/pollux/\n"
465 " lsa-refresh-time -1800\n"
466 " lsa-interest-lifetime -3\n"
467 " router-dead-interval -86400\n"
468 "}\n\n";
469
470 // Processing should fail due to negative value
471 BOOST_CHECK_EQUAL(processConfigurationString(SECTION_GENERAL_NEGATIVE_VALUE), false);
472}
473
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -0500474BOOST_AUTO_TEST_SUITE_END()
475
476} //namespace test
alvy2fe12872014-11-25 10:32:23 -0600477} //namespace nlsr