summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne H Juul <arnej27959@users.noreply.github.com>2021-11-05 13:28:03 +0100
committerGitHub <noreply@github.com>2021-11-05 13:28:03 +0100
commitd09a2c8c3fc89d58ef5c39cd21b34f5c9d9ea6e7 (patch)
treebf1a480721d902f05b75db8e3b5d444a0c309857
parent45bdada8a918d059e0232e65478f29bf24b8503a (diff)
parent26a634083c685cbfe4c67ffe0f7cc80cfd85f32e (diff)
Merge pull request #19886 from vespa-engine/havardpe/verify-match-feature-setup
verify that match features must be valid
-rw-r--r--searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp b/searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp
index c332d84c4ed..c6c65f45e4b 100644
--- a/searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp
+++ b/searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp
@@ -108,6 +108,9 @@ struct Setup {
void second_phase(const std::string &feature) {
property(rank::SecondPhase::NAME, feature);
}
+ void match_feature(const std::string &feature) {
+ property(match::Feature::NAME, feature);
+ }
void summary_feature(const std::string &feature) {
property(summary::Feature::NAME, feature);
}
@@ -317,6 +320,11 @@ TEST_F("require that second phase can break validation", SimpleSetup()) {
EXPECT_TRUE(!f.verify());
}
+TEST_F("require that match features can break validation", SimpleSetup()) {
+ f.match_feature(invalid_feature);
+ EXPECT_TRUE(!f.verify());
+}
+
TEST_F("require that summary features can break validation", SimpleSetup()) {
f.summary_feature(invalid_feature);
EXPECT_TRUE(!f.verify());