summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2023-01-27 21:42:32 +0300
committerEd Tanous <ed@tanous.net>2023-03-02 02:15:54 +0300
commite68d1be018a203970377d652005bafa14c4bf2f0 (patch)
treeeff3417b5f05910643b3799a81ed03be27523585 /test
parenta88562de3928f88e71505e629b640adfc00c2b62 (diff)
downloadbmcweb-e68d1be018a203970377d652005bafa14c4bf2f0.tar.xz
Add ManagerProvidingService implementation
This property was added in Redfish 2022.3 to allow clients to determine which manager is hosting the ServiceRoot, such that they can find uptime statistics, and other metrics from that resource, without needing to attach them directly to serviceroot. Tested: Redfish service validator passes. GET /redfish/v1/Managers/bmc returns the expected response. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: If2b78528d1499fbdae46120e1a1792ecf7ceb1d3
Diffstat (limited to 'test')
-rw-r--r--test/redfish-core/lib/service_root_test.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/redfish-core/lib/service_root_test.cpp b/test/redfish-core/lib/service_root_test.cpp
index 1f50100057..7ebf8d86ac 100644
--- a/test/redfish-core/lib/service_root_test.cpp
+++ b/test/redfish-core/lib/service_root_test.cpp
@@ -26,7 +26,7 @@ void assertServiceRootGet(crow::Response& res)
{
nlohmann::json& json = res.jsonValue;
EXPECT_EQ(json["@odata.id"], "/redfish/v1");
- EXPECT_EQ(json["@odata.type"], "#ServiceRoot.v1_11_0.ServiceRoot");
+ EXPECT_EQ(json["@odata.type"], "#ServiceRoot.v1_15_0.ServiceRoot");
EXPECT_EQ(json["AccountService"]["@odata.id"],
"/redfish/v1/AccountService");
@@ -45,8 +45,11 @@ void assertServiceRootGet(crow::Response& res)
EXPECT_EQ(json["Id"], "RootService");
EXPECT_EQ(json["Links"]["Sessions"]["@odata.id"],
"/redfish/v1/SessionService/Sessions");
- EXPECT_EQ(json["Links"].size(), 1);
+ EXPECT_EQ(json["Links"].size(), 2);
EXPECT_EQ(json["Links"]["Sessions"].size(), 1);
+ EXPECT_EQ(json["Links"]["ManagerProvidingService"].size(), 1);
+ EXPECT_EQ(json["Links"]["ManagerProvidingService"]["@odata.id"],
+ "/redfish/v1/Managers/bmc");
EXPECT_EQ(json["Managers"]["@odata.id"], "/redfish/v1/Managers");
EXPECT_EQ(json["Managers"].size(), 1);