Remove number support from the router
The router historically came from crow. Crow supported wildcards of
<int>, <float>, and <double>. bmcweb doesn't use them, nor should it in
basically any case, as we now have explicit 404 handling.
This commit removes them. This amounts to about -450 lines of code, but
it's some of the scarier code we have, some of it existing in the
namespace "black_magic". Reducing the brain debt for people working in
this subsystem seems worthwhile. There is no case in the future where
we would use integer based url parameters.
Tested: Redfish service validator passes. Should be good enough
coverage for a code removal.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I34add8df7d3486952474ca7ec3dc6be990c50ed0
diff --git a/test/http/utility_test.cpp b/test/http/utility_test.cpp
index 957c13d..6726455 100644
--- a/test/http/utility_test.cpp
+++ b/test/http/utility_test.cpp
@@ -220,17 +220,9 @@
TEST(Router, ParameterTagging)
{
- EXPECT_EQ(6 * 6 + 6 * 3 + 2, getParameterTag("<uint><double><int>"));
- EXPECT_EQ(1, getParameterTag("<int>"));
- EXPECT_EQ(2, getParameterTag("<uint>"));
- EXPECT_EQ(3, getParameterTag("<float>"));
- EXPECT_EQ(3, getParameterTag("<double>"));
- EXPECT_EQ(4, getParameterTag("<str>"));
- EXPECT_EQ(4, getParameterTag("<string>"));
- EXPECT_EQ(5, getParameterTag("<path>"));
- EXPECT_EQ(6 * 6 + 6 + 1, getParameterTag("<int><int><int>"));
- EXPECT_EQ(6 * 6 + 6 + 2, getParameterTag("<uint><int><int>"));
- EXPECT_EQ(6 * 6 + 6 * 3 + 2, getParameterTag("<uint><double><int>"));
+ EXPECT_EQ(1, getParameterTag("<str>"));
+ EXPECT_EQ(1, getParameterTag("<string>"));
+ EXPECT_EQ(2, getParameterTag("<path>"));
}
TEST(URL, JsonEncoding)