|
| 1 | +/* |
| 2 | + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one |
| 3 | + * or more contributor license agreements. Licensed under the Elastic License |
| 4 | + * 2.0; you may not use this file except in compliance with the Elastic License |
| 5 | + * 2.0. |
| 6 | + */ |
| 7 | + |
| 8 | +package org.elasticsearch.xpack.inference.action; |
| 9 | + |
| 10 | +import org.elasticsearch.action.support.ActionFilters; |
| 11 | +import org.elasticsearch.inference.InferenceServiceRegistry; |
| 12 | +import org.elasticsearch.transport.TransportService; |
| 13 | +import org.elasticsearch.xpack.core.inference.action.InferenceAction; |
| 14 | +import org.elasticsearch.xpack.inference.action.task.StreamingTaskManager; |
| 15 | +import org.elasticsearch.xpack.inference.registry.ModelRegistry; |
| 16 | +import org.elasticsearch.xpack.inference.telemetry.InferenceStats; |
| 17 | + |
| 18 | +import static org.mockito.Mockito.mock; |
| 19 | + |
| 20 | +public class TransportInferenceActionTests extends BaseTransportInferenceActionTestCase<InferenceAction.Request> { |
| 21 | + |
| 22 | + @Override |
| 23 | + protected BaseTransportInferenceAction<InferenceAction.Request> createAction( |
| 24 | + TransportService transportService, |
| 25 | + ActionFilters actionFilters, |
| 26 | + ModelRegistry modelRegistry, |
| 27 | + InferenceServiceRegistry serviceRegistry, |
| 28 | + InferenceStats inferenceStats, |
| 29 | + StreamingTaskManager streamingTaskManager |
| 30 | + ) { |
| 31 | + return new TransportInferenceAction( |
| 32 | + transportService, |
| 33 | + actionFilters, |
| 34 | + modelRegistry, |
| 35 | + serviceRegistry, |
| 36 | + inferenceStats, |
| 37 | + streamingTaskManager |
| 38 | + ); |
| 39 | + } |
| 40 | + |
| 41 | + @Override |
| 42 | + protected InferenceAction.Request createRequest() { |
| 43 | + return mock(); |
| 44 | + } |
| 45 | +} |
0 commit comments