aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/searchdefinition/derived
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-09-07 16:09:45 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2021-09-07 16:09:45 +0200
commitcb9d0ba731eac799da1e60e89f18c6f3ee693ea0 (patch)
tree2b789725d345eceb4591c19f66dd42f62cd43b3d /config-model/src/test/java/com/yahoo/searchdefinition/derived
parentb47f8ea6a94051c54dfd565bb70885db5231ac68 (diff)
Verify that rank profile inheritance is correct and sound. The rank profile must exist and be visible in the inheritance tree of the searchdefinition.
Diffstat (limited to 'config-model/src/test/java/com/yahoo/searchdefinition/derived')
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java
index 138fb333621..41c5c919a62 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java
@@ -9,6 +9,7 @@ import org.junit.Test;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
/**
* Tests exporting
@@ -165,6 +166,16 @@ public class ExportingTestCase extends AbstractExportingTestCase {
}
@Test
+ public void testIllegalSidewaysRankProfileInheritance() throws IOException, ParseException {
+ try {
+ assertCorrectDeriving("illegal_sideways_inheritance", "child1", new TestableDeployLogger());
+ fail();
+ } catch (IllegalArgumentException e) {
+ assertEquals("rank-profile 'child' inherits 'parent', but it does not exist anywhere in the inheritance of search 'child1'.", e.getMessage());
+ }
+ }
+
+ @Test
public void testLanguage() throws IOException, ParseException {
TestableDeployLogger logger = new TestableDeployLogger();
assertCorrectDeriving("language", logger);