Red Hat Bugzilla – Bug 851650
Create unit tests for inventory sync
Last modified: 2012-08-24 11:25:02 EDT
Description of problem:
These tests will involve a combination of state and behavioral verification. The state verification should be pretty similar to the verification done in the integration tests created for bug 851640 - making sure the local inventory matches expected values. The behavioral verification will cover server-side calls. For example, when the agent is merging a unknown resource into its inventory (as would be the case when starting with --purgedata), we want to verify that a call is made to MeasurementServerService to obtain the metric collection schedules for that resource.
On the agent side, we want to add tests for InventoryManager.synchronizeInventory and methods called from there within. Tests should also include coverage for DriftSyncManager, and the relevant parts of MeasurementManager and DriftManager. It may make sense to create separate bugs for some of these different parts as they cover a good bit of code.
Version-Release number of selected component (if applicable):
Steps to Reproduce: