From 1189d5c0cd08c57e3c1f61c3c1c28878064086f5 Mon Sep 17 00:00:00 2001 From: Sicheng Song Date: Sat, 7 Oct 2023 06:24:04 +0000 Subject: [PATCH] Enabling the update connnector setting in corresponding unit test Signed-off-by: Sicheng Song --- .../org/opensearch/ml/rest/RestMLCreateConnectorActionTests.java | 1 - .../org/opensearch/ml/rest/RestMLUpdateConnectorActionTests.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLCreateConnectorActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLCreateConnectorActionTests.java index f48dd93b5d..07f823f905 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLCreateConnectorActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLCreateConnectorActionTests.java @@ -64,7 +64,6 @@ public class RestMLCreateConnectorActionTests extends OpenSearchTestCase { public void setup() { MockitoAnnotations.openMocks(this); when(mlFeatureEnabledSetting.isRemoteInferenceEnabled()).thenReturn(true); - when(mlFeatureEnabledSetting.isUpdateConnectorEnabled()).thenReturn(true); restMLCreateConnectorAction = new RestMLCreateConnectorAction(mlFeatureEnabledSetting); threadPool = new TestThreadPool(this.getClass().getSimpleName() + "ThreadPool"); diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLUpdateConnectorActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLUpdateConnectorActionTests.java index 814402fb66..b057190d98 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLUpdateConnectorActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLUpdateConnectorActionTests.java @@ -67,6 +67,7 @@ public void setup() { client = spy(new NodeClient(Settings.EMPTY, threadPool)); when(mlFeatureEnabledSetting.isRemoteInferenceEnabled()).thenReturn(true); + when(mlFeatureEnabledSetting.isUpdateConnectorEnabled()).thenReturn(true); restMLUpdateConnectorAction = new RestMLUpdateConnectorAction(mlFeatureEnabledSetting); doAnswer(invocation -> {