summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com
diff options
context:
space:
mode:
authorGeir Storli <geirst@oath.com>2018-01-30 14:55:37 +0100
committerGeir Storli <geirst@oath.com>2018-01-30 14:55:37 +0100
commitbd713918d1e4689ab227186137306b62701cab09 (patch)
tree69311c29949efeb7627d0c9f64ab1cfb0f66dd5b /config-model/src/test/java/com
parent384af9d921919280083a91737e8f848809a4c2b8 (diff)
Mark all document types as belonging to the default bucket spaces as default.
This ensures that upcoming changes to document API clients will work as expected when multiple bucket spaces is NOT enabled.
Diffstat (limited to 'config-model/src/test/java/com')
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/ContentSearchClusterTest.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentSearchClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentSearchClusterTest.java
index b1de548356c..67b084e4ce6 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentSearchClusterTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentSearchClusterTest.java
@@ -144,9 +144,11 @@ public class ContentSearchClusterTest {
}
@Test
- public void require_that_bucket_spaces_config_is_produced_for_content_cluster() throws Exception {
+ public void require_that_all_document_types_belong_to_default_bucket_space_by_default() throws Exception {
BucketspacesConfig config = getBucketspacesConfig(createClusterWithGlobalType());
- assertBucketspacesConfigWithTwoDocumentTypes(config);
+ assertEquals(2, config.documenttype().size());
+ assertDocumentType("global", "default", config.documenttype(0));
+ assertDocumentType("regular", "default", config.documenttype(1));
// Safeguard against flipping the switch
assertFalse(config.enable_multiple_bucket_spaces());
}
@@ -154,14 +156,10 @@ public class ContentSearchClusterTest {
@Test
public void require_that_multiple_bucket_spaces_can_be_enabled() throws Exception {
BucketspacesConfig config = getBucketspacesConfig(createClusterWithMultipleBucketSpacesEnabled());
- assertBucketspacesConfigWithTwoDocumentTypes(config);
- assertTrue(config.enable_multiple_bucket_spaces());
- }
-
- private static void assertBucketspacesConfigWithTwoDocumentTypes(BucketspacesConfig config) {
assertEquals(2, config.documenttype().size());
assertDocumentType("global", "global", config.documenttype(0));
assertDocumentType("regular", "default", config.documenttype(1));
+ assertTrue(config.enable_multiple_bucket_spaces());
}
}