KeyPair extends Resource { static String normalizeName(String keyName) { return keyName.replaceAll(":", "-"); } KeyPair(String id, String name); static Path keyFile(String keyName, Environment env); @Override void validate(Resources resources); @Override String toString(); final String name; public KeyPairInfo remoteKeyPair; }
@Test void normalizeName() { assertEquals("env-test", KeyPair.normalizeName("env:test")); }