use of org.eclipse.che.api.environment.server.EnvironmentParser.SERVER_CONF_LABEL_PROTOCOL_SUFFIX in project che by eclipse.
the class EnvironmentParserTest method environmentWithServersProvider.
@DataProvider(name = "environmentWithServersProvider")
public static Object[][] environmentWithServersProvider() {
// Format of result array:
// [ [environment object, expected che services environment object, @Nullable compose representation of environment], ... ]
List<List<Object>> data = new ArrayList<>();
data.add(getEntryForDockerfileEnv(emptyMap(), emptyList(), emptyMap()));
data.add(getEntryForDockerfileEnv(singletonMap("ref1", new ServerConf2Impl("8080", "http", emptyMap())), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerfileEnv(singletonMap("ref1", new ServerConf2Impl("8080/tcp", "http", emptyMap())), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerfileEnv(singletonMap("ref1", new ServerConf2Impl("8080/udp", "http", emptyMap())), singletonList("8080/udp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerfileEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", emptyMap())), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerfileEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "/some/path"))), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "/some/path")));
data.add(getEntryForDockerfileEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "some/path"))), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some/path")));
data.add(getEntryForDockerfileEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", ""))), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "")));
data.add(getEntryForDockerfileEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", null))), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerfileEnv(singletonMap("ref1", new ServerConf2Impl("8080", null, emptyMap())), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerfileEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", splitOnPairsAsMap("some", "value"))), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerfileEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", splitOnPairsAsMap("some", "value", "path", "some"))), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some")));
data.add(getEntryForDockerfileEnv(serversMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "some/path")), "ref2", new ServerConf2Impl("9090", "http", singletonMap("path", "/some/path"))), asList("8080/tcp", "9090/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some/path", SERVER_CONF_LABEL_PREFIX + "9090/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "9090/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref2", SERVER_CONF_LABEL_PREFIX + "9090/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "/some/path")));
data.add(getEntryForDockerfileEnv(serversMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "some/path")), "ref2", new ServerConf2Impl("8080/udp", "http", singletonMap("path", "/some/path"))), asList("8080/tcp", "8080/udp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some/path", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref2", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_PATH_SUFFIX, "/some/path")));
data.add(getEntryForDockerimageEnv(emptyMap(), emptyList(), emptyMap()));
data.add(getEntryForDockerimageEnv(singletonMap("ref1", new ServerConf2Impl("8080", "http", emptyMap())), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerimageEnv(singletonMap("ref1", new ServerConf2Impl("8080/tcp", "http", emptyMap())), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerimageEnv(singletonMap("ref1", new ServerConf2Impl("8080/udp", "http", emptyMap())), singletonList("8080/udp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerimageEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", emptyMap())), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerimageEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "/some/path"))), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "/some/path")));
data.add(getEntryForDockerimageEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "some/path"))), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some/path")));
data.add(getEntryForDockerimageEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", ""))), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "")));
data.add(getEntryForDockerimageEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", null))), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerimageEnv(singletonMap("ref1", new ServerConf2Impl("8080", null, emptyMap())), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerimageEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", splitOnPairsAsMap("some", "value"))), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForDockerimageEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", splitOnPairsAsMap("some", "value", "path", "some"))), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some")));
data.add(getEntryForDockerimageEnv(serversMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "some/path")), "ref2", new ServerConf2Impl("9090", "http", singletonMap("path", "/some/path"))), asList("8080/tcp", "9090/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some/path", SERVER_CONF_LABEL_PREFIX + "9090/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "9090/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref2", SERVER_CONF_LABEL_PREFIX + "9090/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "/some/path")));
data.add(getEntryForDockerimageEnv(serversMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "some/path")), "ref2", new ServerConf2Impl("8080/udp", "http", singletonMap("path", "/some/path"))), asList("8080/tcp", "8080/udp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some/path", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref2", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_PATH_SUFFIX, "/some/path")));
data.add(getEntryForComposeEnv(emptyMap(), emptyList(), emptyMap(), emptyList(), emptyMap()));
data.add(getEntryForComposeEnv(singletonMap("ref1", new ServerConf2Impl("8080", "http", emptyMap())), emptyList(), emptyMap(), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForComposeEnv(singletonMap("ref1", new ServerConf2Impl("8080/tcp", "http", emptyMap())), emptyList(), emptyMap(), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForComposeEnv(singletonMap("ref1", new ServerConf2Impl("8080/udp", "http", emptyMap())), emptyList(), emptyMap(), singletonList("8080/udp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForComposeEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", emptyMap())), emptyList(), emptyMap(), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForComposeEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "/some/path"))), emptyList(), emptyMap(), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "/some/path")));
data.add(getEntryForComposeEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "some/path"))), emptyList(), emptyMap(), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some/path")));
data.add(getEntryForComposeEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", ""))), emptyList(), emptyMap(), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "")));
data.add(getEntryForComposeEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", null))), emptyList(), emptyMap(), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForComposeEnv(singletonMap("ref1", new ServerConf2Impl("8080", null, emptyMap())), emptyList(), emptyMap(), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForComposeEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", splitOnPairsAsMap("some", "value"))), emptyList(), emptyMap(), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1")));
data.add(getEntryForComposeEnv(singletonMap("ref1", new ServerConf2Impl("8080", "https", splitOnPairsAsMap("some", "value", "path", "some"))), emptyList(), emptyMap(), singletonList("8080/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some")));
data.add(getEntryForComposeEnv(serversMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "some/path")), "ref2", new ServerConf2Impl("9090", "http", singletonMap("path", "/some/path"))), emptyList(), emptyMap(), asList("8080/tcp", "9090/tcp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some/path", SERVER_CONF_LABEL_PREFIX + "9090/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "9090/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref2", SERVER_CONF_LABEL_PREFIX + "9090/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "/some/path")));
data.add(getEntryForComposeEnv(serversMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "some/path")), "ref2", new ServerConf2Impl("8080/udp", "http", singletonMap("path", "/some/path"))), emptyList(), emptyMap(), asList("8080/tcp", "8080/udp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some/path", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref2", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_PATH_SUFFIX, "/some/path")));
data.add(getEntryForComposeEnv(serversMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "some/path")), "ref2", new ServerConf2Impl("8080/udp", "http", singletonMap("path", "/some/path"))), asList("9090/tcp", "9090/udp", "7070", "7070/udp"), emptyMap(), asList("8080/tcp", "8080/udp", "9090/udp", "9090/tcp", "7070/tcp", "7070/udp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some/path", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref2", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_PATH_SUFFIX, "/some/path")));
data.add(getEntryForComposeEnv(serversMap("ref1", new ServerConf2Impl("8080", "https", singletonMap("path", "some/path")), "ref2", new ServerConf2Impl("8080/udp", "http", singletonMap("path", "/some/path"))), emptyList(), splitOnPairsAsMap("label1", "value1", "label2", "value2"), asList("8080/tcp", "8080/udp"), splitOnPairsAsMap(SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "https", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref1", SERVER_CONF_LABEL_PREFIX + "8080/tcp" + SERVER_CONF_LABEL_PATH_SUFFIX, "some/path", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_PROTOCOL_SUFFIX, "http", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_REF_SUFFIX, "ref2", SERVER_CONF_LABEL_PREFIX + "8080/udp" + SERVER_CONF_LABEL_PATH_SUFFIX, "/some/path", "label1", "value1", "label2", "value2")));
return data.stream().map(list -> list.toArray(new Object[list.size()])).toArray(value -> new Object[data.size()][]);
}
Aggregations