aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/vespa/document/test/make_bucket_space.cpp
blob: 525dd017c3aa9ccf55886f8a5e3f6bd334b6d04d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "make_bucket_space.h"

namespace document::test {

BucketSpace makeBucketSpace() noexcept
{
    return BucketSpace(1);
}

BucketSpace makeBucketSpace(const vespalib::string &docTypeName) noexcept
{
    // Used by persistence conformance test to map from document type name
    // to bucket space.  See document::TestDocRepo for known document types.
    if (docTypeName == "no") {
        return BucketSpace(3);
    } else if (docTypeName == "testdoctype2") {
        return BucketSpace(2);
    } else {
        return makeBucketSpace();
    }
}

}