@Test public void createPingArpCmd() throws Exception { Assert.assertEquals("sudo arping -q -c 1 -S 1.2.3.4 -i dummy0 -B", service.createPingArpCmd()); }
@VisibleForTesting String createPingArpCmd() { return String.format("sudo arping -q -c 1 -S %s -i %s -B", addressToString(virtualIp), interfaceName.split(":")[0]); }
LinuxRoutingService implements Routing { @VisibleForTesting String createPingArpCmd() { return String.format("sudo arping -q -c 1 -S %s -i %s -B", addressToString(virtualIp), interfaceName.split(":")[0]); } }
LinuxRoutingService implements Routing { @VisibleForTesting String createPingArpCmd() { return String.format("sudo arping -q -c 1 -S %s -i %s -B", addressToString(virtualIp), interfaceName.split(":")[0]); } LinuxRoutingService(SystemCall systemCall, RoutingDefinition initializer); }
LinuxRoutingService implements Routing { @VisibleForTesting String createPingArpCmd() { return String.format("sudo arping -q -c 1 -S %s -i %s -B", addressToString(virtualIp), interfaceName.split(":")[0]); } LinuxRoutingService(SystemCall systemCall, RoutingDefinition initializer); String executeCommand(String command); int executeCommandRC(String command); @Override synchronized Routing setInterface(String inf); @Override Routing setNetmask(final IpAddress netmask); @Override IpAddress getNetmask(); @Override synchronized String getInterface(); @Override synchronized IpAddress getVirtualIp(); @Override synchronized boolean isActive(); @Override synchronized boolean removeRouteForCurrentService(); @Override synchronized boolean addRouteForCurrentService(); @Override boolean updateArpTableForCurrentService(); @Override String toString(); }
LinuxRoutingService implements Routing { @VisibleForTesting String createPingArpCmd() { return String.format("sudo arping -q -c 1 -S %s -i %s -B", addressToString(virtualIp), interfaceName.split(":")[0]); } LinuxRoutingService(SystemCall systemCall, RoutingDefinition initializer); String executeCommand(String command); int executeCommandRC(String command); @Override synchronized Routing setInterface(String inf); @Override Routing setNetmask(final IpAddress netmask); @Override IpAddress getNetmask(); @Override synchronized String getInterface(); @Override synchronized IpAddress getVirtualIp(); @Override synchronized boolean isActive(); @Override synchronized boolean removeRouteForCurrentService(); @Override synchronized boolean addRouteForCurrentService(); @Override boolean updateArpTableForCurrentService(); @Override String toString();  }