]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3615] Applied patches attached to tickets #3615 and #3617.
authorMarcin Siodelski <marcin@isc.org>
Wed, 15 Oct 2014 09:29:25 +0000 (11:29 +0200)
committerMarcin Siodelski <marcin@isc.org>
Wed, 15 Oct 2014 09:29:25 +0000 (11:29 +0200)
The former replaces the -v with the -d parameter in D2 unit tests. This
enables the D2 tests that were skipped when the -v parameter was in use.
The -v causes D2 to print version number and exits. The other patch is
for printing configuration summary in D2 which we were not aware was failing
because tests used to be skipped with -v parameter.

src/bin/d2/tests/d2_cfg_mgr_unittests.cc
src/bin/d2/tests/d2_controller_unittests.cc
src/bin/d2/tests/d_controller_unittests.cc
src/bin/d2/tests/d_test_stubs.cc

index 3abdbd6ceca5255316d0f0cdbde9bb1390550e3c..d5026a043a6da45029f63868df4fac6432b7f186 100644 (file)
@@ -378,7 +378,7 @@ TEST_F(D2CfgMgrTest, validParamsEntry) {
               d2_params_->getIpAddress());
 
     // Verify the configuration summary.
-    EXPECT_EQ("listening on 3001::5, port 777",
+    EXPECT_EQ("listening on 3001::5, port 777, using UDP",
               d2_params_->getConfigSummary());
 }
 
index 4ffc918d239a3e805a90f13bfcfd0e9e0909d829..a43a0953d119a85c2b409998058cf72e2dcd5e14 100644 (file)
@@ -122,7 +122,7 @@ TEST_F(D2ControllerTest, commandLineArgs) {
     char* argv[] = { const_cast<char*>("progName"),
                      const_cast<char*>("-c"),
                      const_cast<char*>(DControllerTest::CFG_TEST_FILE),
-                     const_cast<char*>("-v") };
+                     const_cast<char*>("-d") };
     int argc = 4;
 
     // Verify that verbose flag is false initially.
index 07e47b9a90e0fcfe53245c45faa203620e48c99b..c10d636104e41da965b5d7e695a6e70a1d762e32 100644 (file)
@@ -87,7 +87,7 @@ TEST_F(DStubControllerTest, commandLineArgs) {
     char* argv[] = { const_cast<char*>("progName"),
                      const_cast<char*>("-c"),
                      const_cast<char*>("cfgName"),
-                     const_cast<char*>("-v") };
+                     const_cast<char*>("-d") };
     int argc = 4;
     EXPECT_NO_THROW(parseArgs(argc, argv));
 
@@ -174,7 +174,7 @@ TEST_F(DStubControllerTest, launchProcessInitError) {
     char* argv[] = { const_cast<char*>("progName"),
                      const_cast<char*>("-c"),
                      const_cast<char*>(DControllerTest::CFG_TEST_FILE),
-                     const_cast<char*>("-v") };
+                     const_cast<char*>("-d") };
     int argc = 4;
 
     // Launch the controller in stand alone mode.
@@ -204,7 +204,7 @@ TEST_F(DStubControllerTest, nonexistantConfigFile) {
     char* argv[] = { const_cast<char*>("progName"),
                      const_cast<char*>("-c"),
                      const_cast<char*>("bogus-file"),
-                     const_cast<char*>("-v") };
+                     const_cast<char*>("-d") };
     int argc = 4;
 
     // Record start time, and invoke launch().
@@ -216,7 +216,7 @@ TEST_F(DStubControllerTest, missingConfigFileName) {
     // command line to run standalone
     char* argv[] = { const_cast<char*>("progName"),
                      const_cast<char*>("-c"),
-                     const_cast<char*>("-v") };
+                     const_cast<char*>("-d") };
     int argc = 3;
 
     // Record start time, and invoke launch().
@@ -227,7 +227,7 @@ TEST_F(DStubControllerTest, missingConfigFileName) {
 TEST_F(DStubControllerTest, missingConfigFileArgument) {
     // command line to run standalone
     char* argv[] = { const_cast<char*>("progName"),
-                     const_cast<char*>("-v") };
+                     const_cast<char*>("-d") };
     int argc = 2;
 
     // Record start time, and invoke launch().
index fa91cd35184ef361c7bfeb2cc374997e3e290f19..1cc215255f15be70d8e5359e3eaacde4e1581e94 100644 (file)
@@ -276,7 +276,7 @@ DControllerTest::runWithConfig(const std::string& config, int run_time_ms,
         char* argv[] = { const_cast<char*>("progName"),
                          const_cast<char*>("-c"),
                          const_cast<char*>(DControllerTest::CFG_TEST_FILE),
-                         const_cast<char*>("-v") };
+                         const_cast<char*>("-d") };
         launch(4, argv);
     } catch (...) {
         // calculate elasped time, then rethrow it