Skip to content

Commit a073c17

Browse files
Adding enable twice test
1 parent df298ce commit a073c17

File tree

1 file changed

+22
-0
lines changed
  • x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference

1 file changed

+22
-0
lines changed

x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference/CCMCrudIT.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,28 @@ public void testEnablesCCM_Succeeds() throws IOException {
6969
assertTrue(response.isEnabled());
7070
}
7171

72+
public void testEnablesCCMTwice_Succeeds() throws IOException {
73+
var response = putCCMConfiguration(
74+
PutCCMConfigurationAction.Request.createEnabled(
75+
new SecureString("key".toCharArray()),
76+
TimeValue.THIRTY_SECONDS,
77+
TimeValue.THIRTY_SECONDS
78+
)
79+
);
80+
81+
assertTrue(response.isEnabled());
82+
83+
response = putCCMConfiguration(
84+
PutCCMConfigurationAction.Request.createEnabled(
85+
new SecureString("other_key".toCharArray()),
86+
TimeValue.THIRTY_SECONDS,
87+
TimeValue.THIRTY_SECONDS
88+
)
89+
);
90+
91+
assertTrue(response.isEnabled());
92+
}
93+
7294
public void testEnablesCCM_WithExtraFields_Fails() {
7395
var extraField = "extra_field";
7496
var requestBody = Strings.format("""

0 commit comments

Comments
 (0)