Home
last modified time | relevance | path

Searched hist:a2c2cd728a42b2e215fb7a20fa18208c1bb38a65 (Results 1 – 3 of 3) sorted by relevance

/openbmc/phosphor-psu-code-mgmt/src/
H A Ditem_updater.hppdiff a2c2cd728a42b2e215fb7a20fa18208c1bb38a65 Fri Aug 09 02:54:10 CDT 2019 Lei YU <mine260309@gmail.com> Test: Add unit test for PSU plug out and in

Split the function into two, one for handling the sdbus::message, the
other for handling the changed properties, so that it's easier to write
unit test cases.

Added the test cases:
* On a system with a PSU present, remove the PSU;
* On a system without PSU, plug the PSU in;
* On a system with a PSU, remove the PSU and add it back, while the
propertiesChanged callback is invoked with both Present and Version
properties.
* On a system with two PSUs with same version, remove them one-by-one,
and add back one-by-one, while PSU1 has a different version.

Tested: Verify ItemUpdater correctly handles the above cases:
* Remove the activation and version object if PSU is removed;
* Create activation and version object if PSU is added;
* When there are two PSUs with same version, removing one only
update the associations, removing the other shall result in
the objects to be removed;
Adding one back will create the objects, and adding the other
one with different version will create new objects.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I14c7ae9f03ec91bb1c85bb5a18d69f20dc1efd53
H A Ditem_updater.cppdiff a2c2cd728a42b2e215fb7a20fa18208c1bb38a65 Fri Aug 09 02:54:10 CDT 2019 Lei YU <mine260309@gmail.com> Test: Add unit test for PSU plug out and in

Split the function into two, one for handling the sdbus::message, the
other for handling the changed properties, so that it's easier to write
unit test cases.

Added the test cases:
* On a system with a PSU present, remove the PSU;
* On a system without PSU, plug the PSU in;
* On a system with a PSU, remove the PSU and add it back, while the
propertiesChanged callback is invoked with both Present and Version
properties.
* On a system with two PSUs with same version, remove them one-by-one,
and add back one-by-one, while PSU1 has a different version.

Tested: Verify ItemUpdater correctly handles the above cases:
* Remove the activation and version object if PSU is removed;
* Create activation and version object if PSU is added;
* When there are two PSUs with same version, removing one only
update the associations, removing the other shall result in
the objects to be removed;
Adding one back will create the objects, and adding the other
one with different version will create new objects.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I14c7ae9f03ec91bb1c85bb5a18d69f20dc1efd53
/openbmc/phosphor-psu-code-mgmt/test/
H A Dtest_item_updater.cppdiff a2c2cd728a42b2e215fb7a20fa18208c1bb38a65 Fri Aug 09 02:54:10 CDT 2019 Lei YU <mine260309@gmail.com> Test: Add unit test for PSU plug out and in

Split the function into two, one for handling the sdbus::message, the
other for handling the changed properties, so that it's easier to write
unit test cases.

Added the test cases:
* On a system with a PSU present, remove the PSU;
* On a system without PSU, plug the PSU in;
* On a system with a PSU, remove the PSU and add it back, while the
propertiesChanged callback is invoked with both Present and Version
properties.
* On a system with two PSUs with same version, remove them one-by-one,
and add back one-by-one, while PSU1 has a different version.

Tested: Verify ItemUpdater correctly handles the above cases:
* Remove the activation and version object if PSU is removed;
* Create activation and version object if PSU is added;
* When there are two PSUs with same version, removing one only
update the associations, removing the other shall result in
the objects to be removed;
Adding one back will create the objects, and adding the other
one with different version will create new objects.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I14c7ae9f03ec91bb1c85bb5a18d69f20dc1efd53