aboutsummaryrefslogtreecommitdiffstats
path: root/model-evaluation/src/test/java/ai/vespa/models/handler/ModelsEvaluationHandlerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'model-evaluation/src/test/java/ai/vespa/models/handler/ModelsEvaluationHandlerTest.java')
-rw-r--r--model-evaluation/src/test/java/ai/vespa/models/handler/ModelsEvaluationHandlerTest.java22
1 files changed, 18 insertions, 4 deletions
diff --git a/model-evaluation/src/test/java/ai/vespa/models/handler/ModelsEvaluationHandlerTest.java b/model-evaluation/src/test/java/ai/vespa/models/handler/ModelsEvaluationHandlerTest.java
index 0de8ce5f061..d804e50c67d 100644
--- a/model-evaluation/src/test/java/ai/vespa/models/handler/ModelsEvaluationHandlerTest.java
+++ b/model-evaluation/src/test/java/ai/vespa/models/handler/ModelsEvaluationHandlerTest.java
@@ -49,16 +49,30 @@ public class ModelsEvaluationHandlerTest {
@Test
public void testListModels() {
String url = "http://localhost/model-evaluation/v1";
- String expected =
- "{\"mnist_softmax\":\"http://localhost/model-evaluation/v1/mnist_softmax\",\"xgboost_non_standalone\":\"http://localhost/model-evaluation/v1/xgboost_non_standalone\",\"mnist_saved\":\"http://localhost/model-evaluation/v1/mnist_saved\",\"mnist_softmax_saved\":\"http://localhost/model-evaluation/v1/mnist_softmax_saved\",\"vespa_model\":\"http://localhost/model-evaluation/v1/vespa_model\",\"xgboost_2_2\":\"http://localhost/model-evaluation/v1/xgboost_2_2\",\"lightgbm_regression\":\"http://localhost/model-evaluation/v1/lightgbm_regression\"}";
+ String expected = "{" +
+ "\"lightgbm_regression\":\"http://localhost/model-evaluation/v1/lightgbm_regression\"," +
+ "\"mnist_saved\":\"http://localhost/model-evaluation/v1/mnist_saved\"," +
+ "\"mnist_softmax\":\"http://localhost/model-evaluation/v1/mnist_softmax\"," +
+ "\"mnist_softmax_saved\":\"http://localhost/model-evaluation/v1/mnist_softmax_saved\"," +
+ "\"vespa_model\":\"http://localhost/model-evaluation/v1/vespa_model\"," +
+ "\"xgboost_2_2\":\"http://localhost/model-evaluation/v1/xgboost_2_2\"," +
+ "\"xgboost_non_standalone\":\"http://localhost/model-evaluation/v1/xgboost_non_standalone\"" +
+ "}";
handler.assertResponse(url, 200, expected);
}
@Test
public void testListModelsWithDifferentHost() {
String url = "http://localhost/model-evaluation/v1";
- String expected =
- "{\"mnist_softmax\":\"http://localhost:8088/model-evaluation/v1/mnist_softmax\",\"xgboost_non_standalone\":\"http://localhost:8088/model-evaluation/v1/xgboost_non_standalone\",\"mnist_saved\":\"http://localhost:8088/model-evaluation/v1/mnist_saved\",\"mnist_softmax_saved\":\"http://localhost:8088/model-evaluation/v1/mnist_softmax_saved\",\"vespa_model\":\"http://localhost:8088/model-evaluation/v1/vespa_model\",\"xgboost_2_2\":\"http://localhost:8088/model-evaluation/v1/xgboost_2_2\",\"lightgbm_regression\":\"http://localhost:8088/model-evaluation/v1/lightgbm_regression\"}";
+ String expected = "{" +
+ "\"lightgbm_regression\":\"http://localhost:8088/model-evaluation/v1/lightgbm_regression\"," +
+ "\"mnist_saved\":\"http://localhost:8088/model-evaluation/v1/mnist_saved\"," +
+ "\"mnist_softmax\":\"http://localhost:8088/model-evaluation/v1/mnist_softmax\"," +
+ "\"mnist_softmax_saved\":\"http://localhost:8088/model-evaluation/v1/mnist_softmax_saved\"," +
+ "\"vespa_model\":\"http://localhost:8088/model-evaluation/v1/vespa_model\"," +
+ "\"xgboost_2_2\":\"http://localhost:8088/model-evaluation/v1/xgboost_2_2\"," +
+ "\"xgboost_non_standalone\":\"http://localhost:8088/model-evaluation/v1/xgboost_non_standalone\"" +
+ "}";
handler.assertResponse(url, 200, expected, Map.of("Host", "localhost:8088"));
}