summaryrefslogtreecommitdiff
path: root/http/ut
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-05-11 02:01:17 +0300
committerEd Tanous <edtanous@google.com>2022-05-11 02:02:36 +0300
commitd01e32c3786f2fbbb70c9724a87cf979b4a06232 (patch)
tree2b0618b7cfa94ead72eb0d3d02338cdfd7cc03d3 /http/ut
parent867b2056d44300db9769e0d0b8883435a179834c (diff)
downloadbmcweb-d01e32c3786f2fbbb70c9724a87cf979b4a06232.tar.xz
Revert "Handle HEAD and Allow headers per the spec"
This reverts commit 867b2056d44300db9769e0d0b8883435a179834c. Apparently we have broken the Redfish spec in a way that adding this feature now allows the service validator to find. @odata.id /redfish/v1/UpdateService ERROR - Allow header should NOT contain POST for UpdateService.v1_5_0.UpdateService Need to figure out what to do, but for now, revert to get the build passing again. Change-Id: Ieef20573b9caa03aba6fd2bbc999e517e4b7de3d Signed-off-by: Ed Tanous <edtanous@google.com>
Diffstat (limited to 'http/ut')
-rw-r--r--http/ut/router_test.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/http/ut/router_test.cpp b/http/ut/router_test.cpp
deleted file mode 100644
index da0f72c149..0000000000
--- a/http/ut/router_test.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#include "http_request.hpp"
-#include "routing.hpp"
-
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
-TEST(Router, AllowHeader)
-{
- // Callback handler that does nothing
- auto nullCallback = [](const crow::Request&,
- const std::shared_ptr<bmcweb::AsyncResp>&) {};
-
- crow::Router router;
- std::error_code ec;
-
- constexpr const std::string_view url = "/foo";
-
- crow::Request req{{boost::beast::http::verb::get, url, 11}, ec};
-
- // No route should return no methods.
- router.validate();
- EXPECT_EQ(router.buildAllowHeader(req), "");
-
- router
- .newRuleTagged<crow::black_magic::getParameterTag(url)>(
- std::string(url))
- .methods(boost::beast::http::verb::get)(nullCallback);
- router.validate();
- EXPECT_EQ(router.buildAllowHeader(req), "GET");
-
- router
- .newRuleTagged<crow::black_magic::getParameterTag(url)>(
- std::string(url))
- .methods(boost::beast::http::verb::patch)(nullCallback);
- router.validate();
- EXPECT_EQ(router.buildAllowHeader(req), "GET, PATCH");
-} \ No newline at end of file