From c4751eaf613d5ae4a059164cce196952774b3778 Mon Sep 17 00:00:00 2001 From: florian <f.spreckelsen@inidscale.com> Date: Mon, 2 Aug 2021 12:44:51 +0200 Subject: [PATCH] ENH: Add warnings and errors --- src/caosdb/entity.cpp | 2 ++ test/test_entity.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/caosdb/entity.cpp b/src/caosdb/entity.cpp index 24fd382..57935d1 100644 --- a/src/caosdb/entity.cpp +++ b/src/caosdb/entity.cpp @@ -75,6 +75,8 @@ Entity::Entity() : wrapped(Entity::CreateProtoEntity()) { properties.wrapped = this->wrapped->mutable_properties(); parents.wrapped = this->wrapped->mutable_parents(); errors.wrapped = this->wrapped->mutable_errors(); + warnings.wrapped = this->wrapped->mutable_warnings(); + infos.wrapped = this->wrapped->mutable_infos(); } Entity::Entity(IdResponse *idResponse) : Entity() { diff --git a/test/test_entity.cpp b/test/test_entity.cpp index 7914eeb..57bc8cf 100644 --- a/test/test_entity.cpp +++ b/test/test_entity.cpp @@ -103,6 +103,7 @@ TEST(test_entity, test_from_id_response) { // NOLINT std::cout << other_ent.ToString() << std::endl; EXPECT_EQ(other_ent.GetId(), "other_entity_id"); + std::cout << other_ent.GetWarnings().Size(); EXPECT_EQ(other_ent.GetWarnings().Size(), 1); EXPECT_EQ(other_ent.GetWarnings().At(0).GetDescription(), "warning_desc"); EXPECT_EQ(other_ent.GetWarnings().At(0).GetCode(), -- GitLab