Summary: | ASTERISK-23187: testsuite: Write a test for the AstDB | ||
Reporter: | Matt Jordan (mjordan) | Labels: | |
Date Opened: | 2014-01-26 21:37:13.000-0600 | Date Closed: | 2014-02-15 22:16:03.000-0600 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Core/AstDB Tests/testsuite |
Versions: | 1.8.25.0 11.7.0 12.0.0 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | We could use a test for the Asterisk Test Suite that verifies the AstDB. This should be in the {{tests/pbx/}} directory (for lack of a better place). The test should be a pluggable component test, and use the SimpleTestCase test object. Pluggable modules that use the AMIEventModule should be used to listen for {{UserEvent}} AMI Events raised from the dialplan. The test should cover the following:
* Use the DB function to verify that a value can be written to the database. Note that the DB function will also have to be used to read the values. This should verify: ** That values can be written to multiple families ** That a value can be re-written to a specific family. ** That values read from a particular family are returned by the DB function ** That values read from a particular family are stored in the DB_RESULT channel variable * Use the DB function to verify that non-existent families return an empty string ('') * Use the DB_EXISTS function to verify whether or not a particular family exists. This should test both families that do exist as well as families that do not. * Use the DB_KEYS function to verify that a family prefix will return all keys within a family. This should test: ** A family prefix that returns a single key ** A family prefix that returns more than one key ** A family prefix that should return no keys (bad family prefix) * Verify the DB_DELETE function. This should check: ** That an unknown family returns '' ** That a known family returns the key and is deleted (a subsequent call should return '') | ||
Comments: |