def test_cfn_cluster_start_fail(self): template_url = setup_configurations() args = CreateClusterArgs(template_url, True) with self.assertRaises(SystemExit) as sys_ex: pcluster.start(args) self.assertEqual(sys_ex.exception.code, 1) log = test_log_stream.getvalue() error_prefix = "CRITICAL:" self.assertTrue(error_prefix in log)
def test_cfn_cluster_start(self): template_url = setup_configurations() args = CreateClusterArgs(template_url, True) pcluster.create(args) pcluster.start(args) log = test_log_stream.getvalue() error_prefix = "CRITICAL:" success_message = "Starting compute fleet" self.assertFalse(error_prefix in log) self.assertTrue(success_message in log)
def start(args): pcluster.start(args)