summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/fileconfigmanager
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2020-08-31 10:32:50 +0000
committerHåvard Pettersen <havardpe@oath.com>2020-09-01 12:45:13 +0000
commit3440f424ab11d8d8810b6f9785e6a8fad7271fe1 (patch)
treeb769b0acf1485b4b18fd51efe556c8a6b583c7bf /searchcore/src/tests/proton/documentdb/fileconfigmanager
parent3b8f7fdff4872bd010286753f6072ec492f14a48 (diff)
handle onnx models config
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/fileconfigmanager')
-rw-r--r--searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp
index 2782117d8ae..2352fda65a0 100644
--- a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp
@@ -28,6 +28,7 @@ using namespace vespa::config::search;
using namespace std::chrono_literals;
using vespa::config::content::core::BucketspacesConfig;
using proton::matching::RankingConstants;
+using proton::matching::OnnxModels;
typedef DocumentDBConfigHelper DBCM;
typedef DocumentDBConfig::DocumenttypesConfigSP DocumenttypesConfigSP;
@@ -77,7 +78,9 @@ assertEqualSnapshot(const DocumentDBConfig &exp, const DocumentDBConfig &act)
{
EXPECT_TRUE(exp.getRankProfilesConfig() == act.getRankProfilesConfig());
EXPECT_TRUE(exp.getRankingConstants() == act.getRankingConstants());
+ EXPECT_TRUE(exp.getOnnxModels() == act.getOnnxModels());
EXPECT_EQUAL(0u, exp.getRankingConstants().size());
+ EXPECT_EQUAL(0u, exp.getOnnxModels().size());
EXPECT_TRUE(exp.getIndexschemaConfig() == act.getIndexschemaConfig());
EXPECT_TRUE(exp.getAttributesConfig() == act.getAttributesConfig());
EXPECT_TRUE(exp.getSummaryConfig() == act.getSummaryConfig());
@@ -105,6 +108,9 @@ addConfigsThatAreNotSavedToDisk(const DocumentDBConfig &cfg)
RankingConstants::Vector constants = {{"my_name", "my_type", "my_path"}};
builder.rankingConstants(std::make_shared<RankingConstants>(constants));
+ OnnxModels::Vector models = {{"my_model_name", "my_model_file"}};
+ builder.onnxModels(std::make_shared<OnnxModels>(models));
+
ImportedFieldsConfigBuilder importedFields;
importedFields.attribute.resize(1);
importedFields.attribute.back().name = "my_name";