summaryrefslogtreecommitdiffstats
path: root/storage/src/tests/storageserver
diff options
context:
space:
mode:
Diffstat (limited to 'storage/src/tests/storageserver')
-rw-r--r--storage/src/tests/storageserver/bouncertest.cpp4
-rw-r--r--storage/src/tests/storageserver/communicationmanagertest.cpp6
-rw-r--r--storage/src/tests/storageserver/documentapiconvertertest.cpp3
3 files changed, 6 insertions, 7 deletions
diff --git a/storage/src/tests/storageserver/bouncertest.cpp b/storage/src/tests/storageserver/bouncertest.cpp
index 35b752fedfd..c19d8814af4 100644
--- a/storage/src/tests/storageserver/bouncertest.cpp
+++ b/storage/src/tests/storageserver/bouncertest.cpp
@@ -100,7 +100,7 @@ BouncerTest::createDummyFeedMessage(api::Timestamp timestamp,
{
auto cmd = std::make_shared<api::RemoveCommand>(
makeDocumentBucket(document::BucketId(0)),
- document::DocumentId("doc:foo:bar"),
+ document::DocumentId("id:ns:foo::bar"),
timestamp);
cmd->setPriority(priority);
return cmd;
@@ -112,7 +112,7 @@ BouncerTest::createDummyFeedMessage(api::Timestamp timestamp,
{
auto cmd = std::make_shared<api::RemoveCommand>(
document::Bucket(bucketSpace, document::BucketId(0)),
- document::DocumentId("doc:foo:bar"),
+ document::DocumentId("id:ns:foo::bar"),
timestamp);
cmd->setPriority(Priority(0));
return cmd;
diff --git a/storage/src/tests/storageserver/communicationmanagertest.cpp b/storage/src/tests/storageserver/communicationmanagertest.cpp
index b970e56343e..caee6e6ab91 100644
--- a/storage/src/tests/storageserver/communicationmanagertest.cpp
+++ b/storage/src/tests/storageserver/communicationmanagertest.cpp
@@ -32,7 +32,7 @@ struct CommunicationManagerTest : Test {
api::StorageMessage::Priority priority)
{
auto cmd = std::make_shared<api::GetCommand>(makeDocumentBucket(document::BucketId(0)),
- document::DocumentId("doc::mydoc"),
+ document::DocumentId("id:ns:mytype::mydoc"),
"[all]");
cmd->setAddress(api::StorageMessageAddress("storage", lib::NodeType::STORAGE, 1));
cmd->setPriority(priority);
@@ -69,13 +69,13 @@ TEST_F(CommunicationManagerTest, simple) {
// Send a message through from distributor to storage
auto cmd = std::make_shared<api::GetCommand>(
- makeDocumentBucket(document::BucketId(0)), document::DocumentId("doc::mydoc"), "[all]");
+ makeDocumentBucket(document::BucketId(0)), document::DocumentId("id:ns:mytype::mydoc"), "[all]");
cmd->setAddress(api::StorageMessageAddress("storage", lib::NodeType::STORAGE, 1));
distributorLink->sendUp(cmd);
storageLink->waitForMessages(1, MESSAGE_WAIT_TIME_SEC);
ASSERT_GT(storageLink->getNumCommands(), 0);
auto cmd2 = std::dynamic_pointer_cast<api::StorageCommand>(storageLink->getCommand(0));
- EXPECT_EQ("doc::mydoc", dynamic_cast<api::GetCommand&>(*cmd2).getDocumentId().toString());
+ EXPECT_EQ("id:ns:mytype::mydoc", dynamic_cast<api::GetCommand&>(*cmd2).getDocumentId().toString());
// Reply to the message
std::shared_ptr<api::StorageReply> reply(cmd2->makeReply().release());
storageLink->sendUp(reply);
diff --git a/storage/src/tests/storageserver/documentapiconvertertest.cpp b/storage/src/tests/storageserver/documentapiconvertertest.cpp
index c879f7d2779..f006277a7b6 100644
--- a/storage/src/tests/storageserver/documentapiconvertertest.cpp
+++ b/storage/src/tests/storageserver/documentapiconvertertest.cpp
@@ -22,7 +22,6 @@ using document::Bucket;
using document::BucketId;
using document::BucketSpace;
using document::DataType;
-using document::DocIdString;
using document::Document;
using document::DocumentId;
using document::DocumentTypeRepo;
@@ -124,7 +123,7 @@ TEST_F(DocumentApiConverterTest, put) {
}
TEST_F(DocumentApiConverterTest, forwarded_put) {
- auto doc = std::make_shared<Document>(_html_type, DocumentId(DocIdString("test", "test")));
+ auto doc = std::make_shared<Document>(_html_type, DocumentId("id:ns:" + _html_type.getName() + "::test"));
auto putmsg = std::make_unique<documentapi::PutDocumentMessage>(doc);
auto* putmsg_raw = putmsg.get();