def test_start_slaves2(self): """Function: test_start_slaves2 Description: Test with start option with already started slaves. Arguments: """ self.svr.upd_slv_status() if self.svr.is_slv_running(): mysql_libs.chg_slv_state([self.svr], "start") self.svr.upd_slv_status() self.assertTrue(self.svr.is_slv_running()) else: self.assertTrue(self.status)
def test_stop_slaves(self): """Function: test_stop_slaves Description: Test with stop option. Arguments: """ self.svr.upd_slv_status() if self.svr.is_slv_running(): mysql_libs.chg_slv_state([self.svr], "stop") self.svr.upd_slv_status() self.assertFalse(self.svr.is_slv_running()) else: self.assertTrue(self.status)
def test_non_option(self): """Function: test_non_option Description: Test with a non-option. Arguments: """ self.svr.upd_slv_status() if self.svr.is_slv_running(): with gen_libs.no_std_out(): mysql_libs.chg_slv_state([self.svr], "status") self.svr.upd_slv_status() self.assertTrue(self.svr.is_slv_running()) else: self.assertTrue(self.status)
def test_start_option(self): """Function: test_start_option Description: Test with start option selected. Arguments: """ self.assertFalse(mysql_libs.chg_slv_state([self.server], "start"))
def test_else_option(self): """Function: test_else_option Description: Test with other option selected. Arguments: """ with gen_libs.no_std_out(): self.assertFalse(mysql_libs.chg_slv_state([self.server], "other"))