diff options
author | Ed Tanous <edtanous@google.com> | 2023-02-10 05:08:23 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2023-04-27 20:18:35 +0300 |
commit | 15a42df05b033a06e38d2998511d6c79d09d66a7 (patch) | |
tree | 9e21eba54b9d5783a5d233c69a345d9bb964123d /test/http/utility_test.cpp | |
parent | 02e01b5108d46720a0b438c0d79952464320d954 (diff) | |
download | bmcweb-15a42df05b033a06e38d2998511d6c79d09d66a7.tar.xz |
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
Diffstat (limited to 'test/http/utility_test.cpp')
-rw-r--r-- | test/http/utility_test.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/test/http/utility_test.cpp b/test/http/utility_test.cpp index 957c13d2db..67264551a5 100644 --- a/test/http/utility_test.cpp +++ b/test/http/utility_test.cpp @@ -220,17 +220,9 @@ TEST(Utility, ValidateAndSplitUrlPositive) 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) |