Skip to content

Commit f8a0ec0

Browse files
committed
Lint
1 parent 14c0be5 commit f8a0ec0

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/completion/ElasticInferenceServiceCompletionModelTests.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77

88
package org.elasticsearch.xpack.inference.services.elastic.completion;
99

10-
import org.elasticsearch.ElasticsearchStatusException;
1110
import org.elasticsearch.inference.EmptySecretSettings;
1211
import org.elasticsearch.inference.EmptyTaskSettings;
1312
import org.elasticsearch.inference.TaskType;
1413
import org.elasticsearch.test.ESTestCase;
1514
import org.elasticsearch.xpack.inference.services.elastic.ElasticInferenceServiceComponents;
16-
import org.hamcrest.Matchers;
1715

1816
import static org.hamcrest.Matchers.is;
1917

@@ -66,27 +64,6 @@ public void testModelWithOverriddenServiceSettings() {
6664
assertThat(overriddenModel.uri().toString(), is(originalModel.uri().toString()));
6765
}
6866

69-
public void testUriCreationWithInvalidUrl() {
70-
var invalidUrl = "not-a-valid-url";
71-
var modelId = "my-model-id";
72-
73-
var exception = expectThrows(
74-
ElasticsearchStatusException.class,
75-
() -> new ElasticInferenceServiceCompletionModel(
76-
"id",
77-
TaskType.COMPLETION,
78-
"elastic",
79-
new ElasticInferenceServiceCompletionServiceSettings(modelId),
80-
EmptyTaskSettings.INSTANCE,
81-
EmptySecretSettings.INSTANCE,
82-
ElasticInferenceServiceComponents.of(invalidUrl)
83-
)
84-
);
85-
86-
assertThat(exception.status().getStatus(), is(400));
87-
assertThat(exception.getMessage(), Matchers.containsString("Failed to create URI"));
88-
}
89-
9067
public static ElasticInferenceServiceCompletionModel createModel(String url, String modelId) {
9168
return new ElasticInferenceServiceCompletionModel(
9269
"id",

0 commit comments

Comments
 (0)