[asterisk-bugs] [JIRA] (ASTERISK-23188) testsuite: Write a test for the AstDB

Matt Jordan (JIRA) noreply at issues.asterisk.org
Sun Jan 26 21:39:04 CST 2014


Matt Jordan created ASTERISK-23188:
--------------------------------------

             Summary: testsuite: Write a test for the AstDB
                 Key: ASTERISK-23188
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23188
             Project: Asterisk
          Issue Type: Improvement
      Security Level: None
          Components: Core/AstDB, Tests/testsuite
    Affects Versions: 1.8.25.0, 11.7.0, 12.0.0
            Reporter: Matt Jordan


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 '')


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list