Commit 73bafb1f authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[3615] Applied patches attached to tickets #3615 and #3617.

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.
parent 2ab5930b
......@@ -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());
}
......
......@@ -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.
......
......@@ -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().
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment