summaryrefslogtreecommitdiff
path: root/redfish-core/lib/ut
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2021-10-05 03:02:43 +0300
committerEd Tanous <ed@tanous.net>2022-04-05 21:50:46 +0300
commitf4c99e70dad320abf84fd25a32ad5fce2bf16f4a (patch)
treeabd2889eeab39f5b0b0dc0772260b3d29d16b58f /redfish-core/lib/ut
parentfa0b217fc0d4ec246d79055c463c1e7f573fd4c8 (diff)
downloadbmcweb-f4c99e70dad320abf84fd25a32ad5fce2bf16f4a.tar.xz
Redfish: Query parameters: Only
Add the query parameter "only" for redfish. The specification is based on DSP0266_1.8.0. This commit is inspired by the commit that carries the same title, but is largely unique, namely, in that it adds the core feature to be able to recall handle with a new Response object, and make sure the result gets to the connection. It does this by swapping the handlers and implementing move semantics on the Response object. It definitely needs broken up into a few smaller patches, but it does pass the below tests without any apparent seg faults or ownership issues. It implements a number of cleanups that deserve their own patches, and will be split up accordingly, but for the moment, I think this is a good start to getting filter and expand support in the future. Tested: Validator passes (on previous patchset) ~$ curl -i -k -H "X-Auth-Token: $token" -X GET "https://${bmc}/redfish/v1/Systems" ~$ curl -i -k -H "X-Auth-Token: $token" -X GET "https://${bmc}/redfish/v1/Systems?only" Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I123d8ab8bcd88a0b63ff131f6b98548951989755
Diffstat (limited to 'redfish-core/lib/ut')
-rw-r--r--redfish-core/lib/ut/service_root_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/redfish-core/lib/ut/service_root_test.cpp b/redfish-core/lib/ut/service_root_test.cpp
index 61b0d02f9a..4c05751f09 100644
--- a/redfish-core/lib/ut/service_root_test.cpp
+++ b/redfish-core/lib/ut/service_root_test.cpp
@@ -73,7 +73,8 @@ static void assertServiceRootGet(crow::Response& res)
EXPECT_FALSE(json["ProtocolFeaturesSupported"]["ExpandQuery"]["NoLinks"]);
EXPECT_EQ(json["ProtocolFeaturesSupported"]["ExpandQuery"].size(), 4);
EXPECT_FALSE(json["ProtocolFeaturesSupported"]["FilterQuery"]);
- EXPECT_FALSE(json["ProtocolFeaturesSupported"]["OnlyMemberQuery"]);
+ EXPECT_EQ(json["ProtocolFeaturesSupported"]["OnlyMemberQuery"],
+ bmcwebInsecureEnableQueryParams);
EXPECT_FALSE(json["ProtocolFeaturesSupported"]["SelectQuery"]);
EXPECT_FALSE(
json["ProtocolFeaturesSupported"]["DeepOperations"]["DeepPOST"]);