Skip to content

Commit 8a6d263

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent bd43116 commit 8a6d263

File tree

5 files changed

+28
-10
lines changed

5 files changed

+28
-10
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/inference/action/CCMEnabledActionResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import java.io.IOException;
1717
import java.util.Objects;
1818

19-
public class CCMEnabledActionResponse extends ActionResponse implements ToXContentObject {
19+
public class CCMEnabledActionResponse extends ActionResponse implements ToXContentObject {
2020
public static final String ENABLED_FIELD_NAME = "enabled";
2121

2222
private final boolean enabled;

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/inference/action/GetCCMConfigurationActionRequestTests.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
public class GetCCMConfigurationActionRequestTests extends AbstractBWCWireSerializationTestCase<GetCCMConfigurationAction.Request> {
1717

1818
@Override
19-
protected GetCCMConfigurationAction.Request mutateInstanceForVersion(GetCCMConfigurationAction.Request instance, TransportVersion version) {
19+
protected GetCCMConfigurationAction.Request mutateInstanceForVersion(
20+
GetCCMConfigurationAction.Request instance,
21+
TransportVersion version
22+
) {
2023
return instance;
2124
}
2225

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/inference/action/PutCCMConfigurationActionRequestTests.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ public void testValidate_BothFieldsNull_ReturnsException() {
2727

2828
public void testValidate_BothFieldsSet_ReturnsException() {
2929
var req = new PutCCMConfigurationAction.Request(
30-
new SecureString("key".toCharArray()), Boolean.TRUE, randomTimeValue(), randomTimeValue());
30+
new SecureString("key".toCharArray()),
31+
Boolean.TRUE,
32+
randomTimeValue(),
33+
randomTimeValue()
34+
);
3135
var ex = req.validate();
3236
assertNotNull(ex);
3337
assertThat(ex.getMessage(), containsString("Only one of [api_key] or [enabled] can be provided but not both"));
@@ -41,16 +45,19 @@ public void testValidate_EnabledTrue_ReturnsException() {
4145
}
4246

4347
public void testValidate_ApiKeyEmpty() {
44-
var req = new PutCCMConfigurationAction.Request(
45-
new SecureString("".toCharArray()), null, randomTimeValue(), randomTimeValue());
48+
var req = new PutCCMConfigurationAction.Request(new SecureString("".toCharArray()), null, randomTimeValue(), randomTimeValue());
4649
var ex = req.validate();
4750
assertNotNull(ex);
4851
assertThat(ex.getMessage(), containsString("The [api_key] field cannot be an empty string"));
4952
}
5053

5154
public void testValidate_ApiKeyValid_DoesNotReturnAnException() {
5255
var req = new PutCCMConfigurationAction.Request(
53-
new SecureString("validkey".toCharArray()), null, randomTimeValue(), randomTimeValue());
56+
new SecureString("validkey".toCharArray()),
57+
null,
58+
randomTimeValue(),
59+
randomTimeValue()
60+
);
5461
var ex = req.validate();
5562
assertNull(ex);
5663
}

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ public void testDisableCCM_WithEnabledTrue_ThrowsException() {
124124
}
125125

126126
public void testDisableCCM_Succeeds() throws IOException {
127-
var response = putCCMConfiguration(PutCCMConfigurationAction.Request.createDisabled(TimeValue.THIRTY_SECONDS, TimeValue.THIRTY_SECONDS));
127+
var response = putCCMConfiguration(
128+
PutCCMConfigurationAction.Request.createDisabled(TimeValue.THIRTY_SECONDS, TimeValue.THIRTY_SECONDS)
129+
);
128130

129131
assertFalse(response.isEnabled());
130132
}
@@ -156,7 +158,9 @@ public void testEnablesCCM_ThenDisable() throws IOException {
156158
assertTrue(response.isEnabled());
157159
assertTrue(getCCMConfiguration().isEnabled());
158160

159-
response = putCCMConfiguration(PutCCMConfigurationAction.Request.createDisabled(TimeValue.THIRTY_SECONDS, TimeValue.THIRTY_SECONDS));
161+
response = putCCMConfiguration(
162+
PutCCMConfigurationAction.Request.createDisabled(TimeValue.THIRTY_SECONDS, TimeValue.THIRTY_SECONDS)
163+
);
160164

161165
assertFalse(response.isEnabled());
162166
assertFalse(getCCMConfiguration().isEnabled());

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ public void testDisableCCM_WithEnabledTrue_ThrowsException() {
122122
}
123123

124124
public void testDisableCCM_Succeeds() throws IOException {
125-
var response = putCCMConfiguration(PutCCMConfigurationAction.Request.createDisabled(TimeValue.THIRTY_SECONDS, TimeValue.THIRTY_SECONDS));
125+
var response = putCCMConfiguration(
126+
PutCCMConfigurationAction.Request.createDisabled(TimeValue.THIRTY_SECONDS, TimeValue.THIRTY_SECONDS)
127+
);
126128

127129
assertFalse(response.isEnabled());
128130
}
@@ -154,7 +156,9 @@ public void testEnablesCCM_ThenDisable() throws IOException {
154156
assertTrue(response.isEnabled());
155157
assertTrue(getCCMConfiguration().isEnabled());
156158

157-
response = putCCMConfiguration(PutCCMConfigurationAction.Request.createDisabled(TimeValue.THIRTY_SECONDS, TimeValue.THIRTY_SECONDS));
159+
response = putCCMConfiguration(
160+
PutCCMConfigurationAction.Request.createDisabled(TimeValue.THIRTY_SECONDS, TimeValue.THIRTY_SECONDS)
161+
);
158162

159163
assertFalse(response.isEnabled());
160164
assertFalse(getCCMConfiguration().isEnabled());

0 commit comments

Comments
 (0)