Bug 707968 - [apache] Improve apache plugin test coverage
Summary: [apache] Improve apache plugin test coverage
Keywords:
Status: ASSIGNED
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 690435 707781 708937
Blocks: jon3
TreeView+ depends on / blocked
 
Reported: 2011-05-26 13:05 UTC by Lukas Krejci
Modified: 2022-03-31 04:28 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Lukas Krejci 2011-05-26 13:05:46 UTC
Given the complexity of the plugin and the number of bugs that have been discovered in it so far, it is very important to improve the unit tests for it.

These are the areas that need improved:

* remove the current ApachePluginTest and write more detailed tests that actually do test something and not just output some heuristics to the standard output.

* test individual components discovery - ideally we need to test the actual discovery components running inside an actual plugin container, not just test that the supporting utility methods return expected data. This will require to somehow mock the native process so that the plugin code can examine it as if a true apache instance was examined.

* test configuration loading/updates - this depends on resolving the bug 707781. The augeas "translation" is already tested, but again the test should ideally work with the live components in a plugin container rather than just testing only the mapping part of the whole algorithm. This requires a mocked apache process as well as some testing configuration files.

* test the whole functionality with different configurations to check that the plugin handles all the oddities with unresolvable hostnames (when the apache is behind a loadbalancer), etc. The test configurations should include:
** normal webserver configuration
** apache behind a loadbalancer
** different combinations of resolvable and unresolvable hostnames and specified or implied ports in Listen, VirtualHost and ServerName directives
** definitions nested inside conditional If* directives (the parsing of configuration files with nested directives is already being tested but again, it'd be better to test this within a running components rather than in isolation).

* upgrade of server and vhost resources from previous versions. Because the resource key format changed and also was not completely deterministic in previous versions, we need to test upgrade from:
** RHQ 1.3.x
** RHQ 3.0.0
** RHQ 3.0.1
** RHQ 3.0.2 (this is unreleased code but patches have been sent to customers)
We need to have inventories for all the different configurations specified above as if they were discovered by the above mentioned versions and test upgrading from them. We also need to test upgrade from inventories suffering from bug 690435.

Comment 1 Lukas Krejci 2011-07-13 12:43:38 UTC
The upgrade tests as outlined above have been pushed to master branch.

Comment 2 Charles Crouch 2011-09-30 17:50:53 UTC
removing superfluous trackers


Note You need to log in before you can comment on or make changes to this bug.