xref: /openbmc/phosphor-ipmi-blobs/test/manager_getsession_unittest.cpp (revision cd8dab491d3f78124be800252186a32a90c884b8)
1*cd8dab49SPatrick Venture #include "manager.hpp"
2ef3aeadcSPatrick Venture 
3ef3aeadcSPatrick Venture #include <gtest/gtest.h>
4ef3aeadcSPatrick Venture 
5ef3aeadcSPatrick Venture namespace blobs
6ef3aeadcSPatrick Venture {
7ef3aeadcSPatrick Venture 
TEST(ManagerGetSessionTest,NextSessionReturned)8ef3aeadcSPatrick Venture TEST(ManagerGetSessionTest, NextSessionReturned)
9ef3aeadcSPatrick Venture {
10ef3aeadcSPatrick Venture     // This test verifies the next session ID is returned.
11ef3aeadcSPatrick Venture     BlobManager mgr;
12ef3aeadcSPatrick Venture 
13ef3aeadcSPatrick Venture     uint16_t first, second;
14ef3aeadcSPatrick Venture     EXPECT_TRUE(mgr.getSession(&first));
15ef3aeadcSPatrick Venture     EXPECT_TRUE(mgr.getSession(&second));
16ef3aeadcSPatrick Venture     EXPECT_FALSE(first == second);
17ef3aeadcSPatrick Venture }
18ef3aeadcSPatrick Venture 
TEST(ManagerGetSessionTest,SessionsCheckedAgainstList)19ef3aeadcSPatrick Venture TEST(ManagerGetSessionTest, SessionsCheckedAgainstList)
20ef3aeadcSPatrick Venture {
21ef3aeadcSPatrick Venture     // TODO(venture): Need a test that verifies the session ids are checked
22ef3aeadcSPatrick Venture     // against open sessions.
23ef3aeadcSPatrick Venture }
24ef3aeadcSPatrick Venture } // namespace blobs
25