throws BadFencingConfigurationException { Args args = new Args(argsStr); InetSocketAddress serviceAddr = target.getAddress(); String host = serviceAddr.getHostName();
throws BadFencingConfigurationException { Args args = new Args(argsStr); InetSocketAddress serviceAddr = target.getAddress(); String host = serviceAddr.getHostName();
throws BadFencingConfigurationException { Args args = new Args(argsStr); InetSocketAddress serviceAddr = target.getAddress(); String host = serviceAddr.getHostName();
throws BadFencingConfigurationException { Args args = new Args(argsStr); InetSocketAddress serviceAddr = target.getAddress(); String host = serviceAddr.getHostName();
throws BadFencingConfigurationException { Args args = new Args(argsStr); InetSocketAddress serviceAddr = target.getAddress(); String host = serviceAddr.getHostName();
@Test public void testArgsParsing() throws BadFencingConfigurationException { Args args = new SshFenceByTcpPort.Args(null); assertEquals(System.getProperty("user.name"), args.user); assertEquals(22, args.sshPort); args = new SshFenceByTcpPort.Args(""); assertEquals(System.getProperty("user.name"), args.user); assertEquals(22, args.sshPort); args = new SshFenceByTcpPort.Args("12345"); assertEquals("12345", args.user); assertEquals(22, args.sshPort); args = new SshFenceByTcpPort.Args(":12345"); assertEquals(System.getProperty("user.name"), args.user); assertEquals(12345, args.sshPort); args = new SshFenceByTcpPort.Args("foo:2222"); assertEquals("foo", args.user); assertEquals(2222, args.sshPort); }
@Test public void testArgsParsing() throws BadFencingConfigurationException { Args args = new SshFenceByTcpPort.Args(null); assertEquals(System.getProperty("user.name"), args.user); assertEquals(22, args.sshPort); args = new SshFenceByTcpPort.Args(""); assertEquals(System.getProperty("user.name"), args.user); assertEquals(22, args.sshPort); args = new SshFenceByTcpPort.Args("12345"); assertEquals("12345", args.user); assertEquals(22, args.sshPort); args = new SshFenceByTcpPort.Args(":12345"); assertEquals(System.getProperty("user.name"), args.user); assertEquals(12345, args.sshPort); args = new SshFenceByTcpPort.Args("foo:2222"); assertEquals("foo", args.user); assertEquals(2222, args.sshPort); }
private void assertBadArgs(String argStr) { try { new Args(argStr); fail("Did not fail on bad args: " + argStr); } catch (BadFencingConfigurationException e) { // Expected } }
/** * Verify that the argument, if given, in the conf is parseable. */ @Override public void checkArgs(String argStr) throws BadFencingConfigurationException { if (argStr != null) { new Args(argStr); } }
/** * Verify that the argument, if given, in the conf is parseable. */ @Override public void checkArgs(String argStr) throws BadFencingConfigurationException { if (argStr != null) { new Args(argStr); } }
/** * Verify that the argument, if given, in the conf is parseable. */ @Override public void checkArgs(String argStr) throws BadFencingConfigurationException { if (argStr != null) { new Args(argStr); } }
/** * Verify that the argument, if given, in the conf is parseable. */ @Override public void checkArgs(String argStr) throws BadFencingConfigurationException { if (argStr != null) { new Args(argStr); } }
private void assertBadArgs(String argStr) { try { new Args(argStr); fail("Did not fail on bad args: " + argStr); } catch (BadFencingConfigurationException e) { // Expected } }
/** * Verify that the argument, if given, in the conf is parseable. */ @Override public void checkArgs(String argStr) throws BadFencingConfigurationException { if (argStr != null) { new Args(argStr); } }