summaryrefslogtreecommitdiff
path: root/redfish-core/ut
AgeCommit message (Collapse)AuthorFilesLines
2020-06-11clang-format: update to latest from docs repoGunnar Mills1-3/+3
This is from openbmc/docs/style/cpp/.clang-format Other OpenBMC repos are doing the same. Tested: Built and validator passed. Change-Id: Ief26c755c9ce012823e16a506342b0547a53517a Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2020-06-09Add unit test for the lock managementmanojkiraneda1-0/+356
- The idea behind this commit is to enable the unit test for the lock management algorithm, and below are the unit test cases that are written: Testedby: [----------] 20 tests from locktest [ RUN ] locktest.ValidationGoodTestCase [ OK ] locktest.ValidationGoodTestCase (3 ms) [ RUN ] locktest.ValidationBadTestWithLocktype [ OK ] locktest.ValidationBadTestWithLocktype (1 ms) [ RUN ] locktest.ValidationBadTestWithlockFlags [ OK ] locktest.ValidationBadTestWithlockFlags (0 ms) [ RUN ] locktest.ValidationBadTestWithSegmentlength [ OK ] locktest.ValidationBadTestWithSegmentlength (1 ms) [ RUN ] locktest.MultiRequestWithoutConflict [ OK ] locktest.MultiRequestWithoutConflict (3 ms) [ RUN ] locktest.MultiRequestWithConflictduetoSameSegmentLength [ OK ] locktest.MultiRequestWithConflictduetoSameSegmentLength (2 ms) [ RUN ] locktest.MultiRequestWithoutConflictduetoDifferentSegmentData [ OK ] locktest.MultiRequestWithoutConflictduetoDifferentSegmentData (1 ms) [ RUN ] locktest.MultiRequestWithConflictduetoSameSegmentData [ OK ] locktest.MultiRequestWithConflictduetoSameSegmentData (2 ms) [ RUN ] locktest.MultiRequestWithoutConflictduetoDifferentSegmentLength [ OK ] locktest.MultiRequestWithoutConflictduetoDifferentSegmentLength (1 ms) [ RUN ] locktest.MultiRequestWithoutConflictduetoReadLocktype [ OK ] locktest.MultiRequestWithoutConflictduetoReadLocktype (1 ms) [ RUN ] locktest.MultiRequestWithoutConflictduetoReadLocktypeAndLockall [ OK ] locktest.MultiRequestWithoutConflictduetoReadLocktypeAndLockall (2 ms) [ RUN ] locktest.RequestConflictedWithLockTableEntries [ OK ] locktest.RequestConflictedWithLockTableEntries (6 ms) [ RUN ] locktest.RequestNotConflictedWithLockTableEntries [ OK ] locktest.RequestNotConflictedWithLockTableEntries (3 ms) [ RUN ] locktest.TestGenerateTransactionIDFunction [ OK ] locktest.TestGenerateTransactionIDFunction (1 ms) [ RUN ] locktest.ValidateTransactionIDsGoodTestCase [ OK ] locktest.ValidateTransactionIDsGoodTestCase (3 ms) [ RUN ] locktest.ValidateTransactionIDsBadTestCase [ OK ] locktest.ValidateTransactionIDsBadTestCase (2 ms) [ RUN ] locktest.ValidateisItMyLockGoodTestCase [ OK ] locktest.ValidateisItMyLockGoodTestCase (2 ms) [ RUN ] locktest.ValidateisItMyLockBadTestCase [ OK ] locktest.ValidateisItMyLockBadTestCase (2 ms) [ RUN ] locktest.ValidateSessionIDForGetlocklistBadTestCase [ OK ] locktest.ValidateSessionIDForGetlocklistBadTestCase (3 ms) [ RUN ] locktest.ValidateSessionIDForGetlocklistGoodTestCase [ OK ] locktest.ValidateSessionIDForGetlocklistGoodTestCase (3 ms) [----------] 20 tests from locktest (82 ms total) Signed-off-by: manojkiraneda <manojkiran.eda@gmail.com> Change-Id: Id274ee356adfa7ba03da02d83b609d37c8c99f8d
2018-09-05Move to clang-format-6.0Ed Tanous1-77/+90
This commit moves the codebase to the lastest clang-format file from upstream, as well as clang-format-6.0. Change-Id: Ice8313468097c0c42317fbb9e10ddf036e8cff4c Signed-off-by: Ed Tanous <ed.tanous@intel.com>
2018-06-29Boost beastEd Tanous1-14/+14
This commit is the beginings of attempting to transition away from crow, and toward boost::beast. Unit tests are passing, and implementation appears to be slightly faster than crow. Change-Id: Ic8d946dc7a04f514c67b1098f181eee1ced69171
2018-03-28Make a few changes to privileges commitEd Tanous1-71/+45
1. Create char* overloads for the things that need it. 2. Fix up a couple errant moves 3. Use the gtest APIs for testing container membership, rather than sort 4. Move the index management to vector rather than map to avoid a lookup 5. Remove errant use of .at() 6. Move privilege comparison into the privilege class, in order to keep the bitset implementation private. This removes the requirment on the forward declaration of PrivilegeProvider, and the use of friend class 7. Remove unimplemented override strcutures. Feel free to add them back once implemented 8. Make setSignlePrivilege return a code if the set failed 9. Remove the need for an extra construction of a blank privileges object for things that require no privileges. Tested by: updating unit tests with the appropriate APIs. Relevant unit tests pass Change-Id: Ie9cde003b6c865979b4cac086379d0a3473896ce Signed-off-by: Ed Tanous <ed.tanous@intel.com>
2018-03-28Privilege implementation changeBorawski.Lukasz1-450/+64
- privilege_registry.json has been removed - PrivilegeProvider class has been removed - default privileges for nodes are now hard-coded - privilege overriding feature is not yet implemented Change-Id: Ic9fdfa1c692c1abd26e339e2a8c702fc4aebd19f Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
2018-03-28Redfish privilegesBorawski.Lukasz1-0/+526
Redfish privilege authorization subsystem controlled by the privilege_registy.json configuration file. PropertyOverrides, SubordinateOverrides and ResourceURIOverrides are not yet implemented. Change-Id: I4d5670d557f4da172460ada3512e015830dab667 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>