int main(int argc, char *argv[]) { Oam oam; //get mysql user password string mysqlpw = oam::UnassignedName; try { mysqlpw = oam.getMySQLPassword(); } catch (...) { cout << oam::UnassignedName << endl; exit (1); } if ( mysqlpw == oam::UnassignedName ) { cout << oam::UnassignedName << endl; exit (1); } cout << mysqlpw << endl; try { oam.setSystemConfig("MySQLPasswordConfig", "y"); } catch(...) {} exit (0); }
void test10() { Oam oamapi; oamapi.setSystemConfig("ModuleCPUMajorThreshold1", 7500); oamapi.getSystemConfig("ModuleCPUMajorThreshold1", Ivalue); CPPUNIT_ASSERT(Ivalue == 7500); };
void test8() { Oam oamapi; oamapi.setSystemConfig("ModuleHeartbeatPeriod", 5); oamapi.getSystemConfig("ModuleHeartbeatPeriod", Ivalue); CPPUNIT_ASSERT(Ivalue == 5); };
void test5() { Oam oamapi; oamapi.setSystemConfig("SystemVersion", "V2.0.2.3"); oamapi.getSystemConfig("SystemVersion", Svalue); CPPUNIT_ASSERT(Svalue == "V2.0.2.3"); };
void test7() { Oam oamapi; oamapi.setSystemConfig("SystemVersionBad", "V2.0.2.3"); };