Registry Test Command is a command line utility to facilitate testing of various components of the application. It is primarily intended for system administrators to perform diagnostic tasks, and is intended to be run manually or scripted.
Usage
Test Command is run via cake shell, ie
$ cd $REGISTRY/app $ ./bin/cake test ...
test [-qv] -t database [--datasource <datasource>]
test [-qv] -t mail --recipient <recipient>
where
- t: The test to run (see below for description of available tests)
- datasource: Datasource to try connecting with
- recipient: Person ID to attempt to send mail to
Return Codes
In addition reporting errors to stderr, Test Command will exit with an appropriate code that can be inspected in scripts using $?
.
Result | CakePHP Constant | Value |
---|---|---|
Success | CODE_SUCCESS | 0 |
Error | CODE_ERROR | 1 |
Available Tests
Database Connectivity (database
)
The database connectivity test attempts to connect to the requested datasource, as defined in $REGISTRY/local/config/database.php
. If not specified, the default
database will be used.
Mail Delivery (mail
)
The mail delivery test attempts to deliver mail to the specified Person. Note that because this is intended to perform end-to-end testing, the recipient is identified using a Person ID, not an email address. As such, delivery is affected by both the CO specific Outbound SMTP Configuration and the Delivery Email Address Type settings. For more information, see Configuring Registry Outgoing Email.