diff --git a/distribution/tools/upgrade-cli/src/test/java/org/opensearch/upgrade/DetectEsInstallationTaskTests.java b/distribution/tools/upgrade-cli/src/test/java/org/opensearch/upgrade/DetectEsInstallationTaskTests.java index fcabf24e9bd35..1038e6d4a484f 100644 --- a/distribution/tools/upgrade-cli/src/test/java/org/opensearch/upgrade/DetectEsInstallationTaskTests.java +++ b/distribution/tools/upgrade-cli/src/test/java/org/opensearch/upgrade/DetectEsInstallationTaskTests.java @@ -49,7 +49,7 @@ public void testTaskExecution() throws Exception { task.accept(input); assertThat(taskInput.getEsConfig(), is(esConfig)); - assertThat(taskInput.getBaseUrl(), is("http://localhost:9200")); + assertThat(taskInput.getBaseUrl(), is("http://localhost:42123")); assertThat(taskInput.getPlugins(), hasSize(0)); assertThat(taskInput.getNode(), is("node-x")); assertThat(taskInput.getCluster(), is("my-cluster")); diff --git a/distribution/tools/upgrade-cli/src/test/java/org/opensearch/upgrade/ImportYmlConfigTaskTests.java b/distribution/tools/upgrade-cli/src/test/java/org/opensearch/upgrade/ImportYmlConfigTaskTests.java index ac30b2034b144..f328cc21685ad 100644 --- a/distribution/tools/upgrade-cli/src/test/java/org/opensearch/upgrade/ImportYmlConfigTaskTests.java +++ b/distribution/tools/upgrade-cli/src/test/java/org/opensearch/upgrade/ImportYmlConfigTaskTests.java @@ -59,8 +59,9 @@ public void testImportYmlConfigTask() throws IOException { taskInput.setEsConfig(esConfig); task.accept(new Tuple<>(taskInput, terminal)); Settings settings = Settings.builder().loadFromPath(taskInput.getOpenSearchConfig().resolve("opensearch.yml")).build(); - assertThat(settings.keySet(), contains("cluster.name", "node.name", "path.data", "path.logs")); + assertThat(settings.keySet(), contains("cluster.name", "http.port", "node.name", "path.data", "path.logs")); assertThat(settings.get("cluster.name"), is("my-cluster")); + assertThat(settings.get("http.port"), is("42123")); assertThat(settings.get("node.name"), is("node-x")); assertThat(settings.get("path.data"), is("[/mnt/data_1, /mnt/data_2]")); assertThat(settings.get("path.logs"), is("/var/log/eslogs")); diff --git a/distribution/tools/upgrade-cli/src/test/java/org/opensearch/upgrade/UpgradeCliTests.java b/distribution/tools/upgrade-cli/src/test/java/org/opensearch/upgrade/UpgradeCliTests.java index 863313d8b417b..3db782925a660 100644 --- a/distribution/tools/upgrade-cli/src/test/java/org/opensearch/upgrade/UpgradeCliTests.java +++ b/distribution/tools/upgrade-cli/src/test/java/org/opensearch/upgrade/UpgradeCliTests.java @@ -113,6 +113,7 @@ private void assertYmlConfigImported() throws IOException { Arrays.asList( "---", "cluster.name: \"my-cluster\"", + "http.port: \"42123\"", "node.name: \"node-x\"", "path.data:", "- \"/mnt/data_1\"", diff --git a/distribution/tools/upgrade-cli/src/test/resources/config/elasticsearch.yml b/distribution/tools/upgrade-cli/src/test/resources/config/elasticsearch.yml index 4262adfba6d01..083b4c7a7452b 100644 --- a/distribution/tools/upgrade-cli/src/test/resources/config/elasticsearch.yml +++ b/distribution/tools/upgrade-cli/src/test/resources/config/elasticsearch.yml @@ -5,3 +5,4 @@ path: - /mnt/data_1 - /mnt/data_2 logs: /var/log/eslogs +http.port: 42123