RT::Test - RT Testing
To run the rt test suite with coverage support, install Devel::Cover and run:
make test RT_DBA_USER=.. RT_DBA_PASSWORD=.. HARNESS_PERL_SWITCHES=-MDevel::Cover cover -ignore_re '^var/mason_data/' -ignore_re '^t/'
This runs /opt/rt5/etc/upgrade/switch-templates-to in order to change the templates from HTML to text or vice versa. TYPE is the type to switch to, either
Calls switch_template_to and tests the return values.
The scrip's applications (RT::ObjectScrip records) are tested to ensure they exactly match the arrayref.
An optional third arrayref may be passed to enumerate and test the queues the scrip is not added to. This is most useful for testing the API returns the correct results.
Takes a path relative to the location of the test file that is being run and returns a path that takes the invocation path into account.
RT::Test::get_relocatable_dir(File::Spec-updir(), 'data', 'emails')>
Parent directory traversals (
.. or File::Spec->updir()) are naively canonicalized based on the test file path (
$0) so that symlinks aren't followed. This is the exact opposite behaviour of most filesystems and is considered "wrong", however it is necessary for some subsets of tests which are symlinked into the testing tree.
Same as get_relocatable_dir, but takes a file and a path instead of just a path.
e.g. RT::Test::get_relocatable_file('test-email', (File::Spec->updir(), 'data', 'emails'))← Back to index