@Test public void testCheckParensNoArgs() { try { Configuration conf = new Configuration(); new NodeFencer(conf, "shell()"); fail("Didn't throw when passing no args to shell"); } catch (BadFencingConfigurationException confe) { assertTrue( "Unexpected exception:" + StringUtils.stringifyException(confe), confe.getMessage().contains("Unable to parse line: 'shell()'")); } }
@Test public void testCheckParensNoArgs() { try { Configuration conf = new Configuration(); new NodeFencer(conf, "shell()"); fail("Didn't throw when passing no args to shell"); } catch (BadFencingConfigurationException confe) { assertTrue( "Unexpected exception:" + StringUtils.stringifyException(confe), confe.getMessage().contains("Unable to parse line: 'shell()'")); } }
@Test public void testCheckNoArgs() { try { Configuration conf = new Configuration(); new NodeFencer(conf, "shell"); fail("Didn't throw when passing no args to shell"); } catch (BadFencingConfigurationException confe) { assertTrue( "Unexpected exception:" + StringUtils.stringifyException(confe), confe.getMessage().contains("No argument passed")); } }
@Test public void testCheckNoArgs() { try { Configuration conf = new Configuration(); new NodeFencer(conf, "shell"); fail("Didn't throw when passing no args to shell"); } catch (BadFencingConfigurationException confe) { assertTrue( "Unexpected exception:" + StringUtils.stringifyException(confe), confe.getMessage().contains("No argument passed")); } }