aboutsummaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahoo-inc.com>2017-10-20 13:36:16 +0200
committerGitHub <noreply@github.com>2017-10-20 13:36:16 +0200
commit5fd803fe826569265db2f76d327610ac829ed7ea (patch)
treed7a341f9f71afe98c2704218a88a5cf47a93374b /document
parentc29d5f06c591d303ef37ae75ab6e306ea3314bd5 (diff)
parent5b37d8b706055661ab68e8b2dee96cdedeaf0c72 (diff)
Merge pull request #3808 from vespa-engine/toregge/add-bucket-space-to-storage-commands-pass4
Adjust constructors for more storage commands to use document::Bucket
Diffstat (limited to 'document')
-rw-r--r--document/CMakeLists.txt1
-rw-r--r--document/src/vespa/document/CMakeLists.txt1
-rw-r--r--document/src/vespa/document/test/CMakeLists.txt6
-rw-r--r--document/src/vespa/document/test/make_document_bucket.cpp12
-rw-r--r--document/src/vespa/document/test/make_document_bucket.h13
5 files changed, 33 insertions, 0 deletions
diff --git a/document/CMakeLists.txt b/document/CMakeLists.txt
index 72f4ee445fb..fd347ca492d 100644
--- a/document/CMakeLists.txt
+++ b/document/CMakeLists.txt
@@ -23,6 +23,7 @@ vespa_define_module(
src/vespa/document/serialization
src/vespa/document/update
src/vespa/document/util
+ src/vespa/document/test
TEST_DEPENDS
vdstestlib
diff --git a/document/src/vespa/document/CMakeLists.txt b/document/src/vespa/document/CMakeLists.txt
index 8d6999fdc24..7ae341f6d4b 100644
--- a/document/src/vespa/document/CMakeLists.txt
+++ b/document/src/vespa/document/CMakeLists.txt
@@ -14,6 +14,7 @@ vespa_add_library(document
$<TARGET_OBJECTS:document_repo>
$<TARGET_OBJECTS:document_serialization>
$<TARGET_OBJECTS:document_predicate>
+ $<TARGET_OBJECTS:document_test>
INSTALL lib64
DEPENDS
)
diff --git a/document/src/vespa/document/test/CMakeLists.txt b/document/src/vespa/document/test/CMakeLists.txt
new file mode 100644
index 00000000000..f16bfe0144a
--- /dev/null
+++ b/document/src/vespa/document/test/CMakeLists.txt
@@ -0,0 +1,6 @@
+# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+vespa_add_library(document_test OBJECT
+ SOURCES
+ make_document_bucket.cpp
+ DEPENDS
+)
diff --git a/document/src/vespa/document/test/make_document_bucket.cpp b/document/src/vespa/document/test/make_document_bucket.cpp
new file mode 100644
index 00000000000..f4d22f7b83f
--- /dev/null
+++ b/document/src/vespa/document/test/make_document_bucket.cpp
@@ -0,0 +1,12 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include "make_document_bucket.h"
+
+namespace document::test {
+
+Bucket makeDocumentBucket(BucketId bucketId)
+{
+ return Bucket(BucketSpace::placeHolder(), bucketId);
+}
+
+}
diff --git a/document/src/vespa/document/test/make_document_bucket.h b/document/src/vespa/document/test/make_document_bucket.h
new file mode 100644
index 00000000000..8c7411cc0e8
--- /dev/null
+++ b/document/src/vespa/document/test/make_document_bucket.h
@@ -0,0 +1,13 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#pragma once
+
+#include <vespa/document/bucket/bucket.h>
+
+namespace document::test {
+
+// Helper function used by unit tests
+
+Bucket makeDocumentBucket(BucketId bucketId);
+
+}