summaryrefslogtreecommitdiff
path: root/src/token_authorization_middleware_test.cpp
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2018-05-23 01:27:24 +0300
committerEd Tanous <ed.tanous@intel.com>2018-07-27 01:54:37 +0300
commit55c7b7a2e58779580f33046d2dd8649243776700 (patch)
treeeed2d032dff3e18c4a8d4778e8f52ae5864620ee /src/token_authorization_middleware_test.cpp
parent1752c9657b56a6e1950d8725f44f4298c9872c63 (diff)
downloadbmcweb-55c7b7a2e58779580f33046d2dd8649243776700.tar.xz
Move over to upstream c++ style
This patchset moves bmcweb over to the upstream style naming conventions for variables, classes, and functions, as well as imposes the latest clang-format file. This changeset was mostly built automatically by the included .clang-tidy file, which has the ability to autoformat and auto rename variables. At some point in the future I would like to see this in greater use, but for now, we will impose it on bmcweb, and see how it goes. Tested: Code still compiles, and appears to run, although other issues are possible and likely. Change-Id: If422a2e36df924e897736b3feffa89f411d9dac1 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'src/token_authorization_middleware_test.cpp')
-rw-r--r--src/token_authorization_middleware_test.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/token_authorization_middleware_test.cpp b/src/token_authorization_middleware_test.cpp
index 47acc857fd..ab735b3a52 100644
--- a/src/token_authorization_middleware_test.cpp
+++ b/src/token_authorization_middleware_test.cpp
@@ -23,8 +23,8 @@ class TokenAuth : public ::testing::Test {
TEST_F(TokenAuth, SpecialResourcesAreAcceptedWithoutAuth) {
CrowApp app(io);
- crow::TokenAuthorization::request_routes(app);
- CROW_ROUTE(app, "/redfish/v1")
+ crow::token_authorization::requestRoutes(app);
+ BMCWEB_ROUTE(app, "/redfish/v1")
([]() { return boost::beast::http::status::ok; });
auto _ = std::async(std::launch::async, [&] {
app.port(testPort).run();
@@ -66,10 +66,10 @@ TEST_F(TokenAuth, SpecialResourcesAreAcceptedWithoutAuth) {
// Tests that Base64 basic strings work
TEST(TokenAuthentication, TestRejectedResource) {
- App<crow::PersistentData::Middleware, crow::TokenAuthorization::Middleware>
+ App<crow::persistent_data::Middleware, crow::token_authorization::Middleware>
app;
app.bindaddr("127.0.0.1").port(45451);
- CROW_ROUTE(app, "/")([]() { return boost::beast::http::status::ok; });
+ BMCWEB_ROUTE(app, "/")([]() { return boost::beast::http::status::ok; });
auto _ = async(std::launch::async, [&] { app.run(); });
asio::io_service is;
@@ -96,10 +96,10 @@ TEST(TokenAuthentication, TestRejectedResource) {
// Tests that Base64 basic strings work
TEST(TokenAuthentication, TestGetLoginUrl) {
- App<crow::PersistentData::Middleware, crow::TokenAuthorization::Middleware>
+ App<crow::persistent_data::Middleware, crow::token_authorization::Middleware>
app;
app.bindaddr("127.0.0.1").port(45451);
- CROW_ROUTE(app, "/")([]() { return boost::beast::http::status::ok; });
+ BMCWEB_ROUTE(app, "/")([]() { return boost::beast::http::status::ok; });
auto _ = async(std::launch::async, [&] { app.run(); });
asio::io_service is;
@@ -126,10 +126,10 @@ TEST(TokenAuthentication, TestGetLoginUrl) {
// Tests boundary conditions on login
TEST(TokenAuthentication, TestPostBadLoginUrl) {
- App<crow::PersistentData::Middleware, crow::TokenAuthorization::Middleware>
+ App<crow::persistent_data::Middleware, crow::token_authorization::Middleware>
app;
app.bindaddr("127.0.0.1").port(45451);
- CROW_ROUTE(app, "/")([]() { return boost::beast::http::status::ok; });
+ BMCWEB_ROUTE(app, "/")([]() { return boost::beast::http::status::ok; });
auto _ = async(std::launch::async, [&] { app.run(); });
asio::io_service is;
@@ -210,10 +210,10 @@ class KnownLoginAuthenticator {
};
TEST(TokenAuthentication, TestSuccessfulLogin) {
- App<crow::PersistentData::Middleware, crow::TokenAuthorization::Middleware>
+ App<crow::persistent_data::Middleware, crow::token_authorization::Middleware>
app;
app.bindaddr("127.0.0.1").port(45451);
- CROW_ROUTE(app, "/")([]() { return boost::beast::http::status::ok; });
+ BMCWEB_ROUTE(app, "/")([]() { return boost::beast::http::status::ok; });
auto _ = async(std::launch::async, [&] { app.run(); });
asio::io_service is;