[rt-users] Tests

Joe Harris drey111 at gmail.com
Wed Mar 28 18:52:50 EDT 2012


In your script add:

use libs /opt/rt4/lib/

To see if for some reason your env vars  aren't seeing the RT path. 

It "may" be use lib and not use libs. I'm not at workstation to log in and check. 

Sent from my mobile device. 

On Mar 28, 2012, at 5:56 PM, Paul Tomblin <ptomblin at xcski.com> wrote:

> Is it possible to do a perl unit test that uses the RT config file?  I tried this is my test:
> 
> #!perl -T
> 
> use Test::More tests => 1;
> 
> use RT;
> 
> BEGIN {
>         RT::LoadConfig();
> 	use_ok( 'RTx:FooBar' );
> };
> 
> And I get some errors about being unable to use RT_SiteConfig.pm:
> t/01-db.t ......... Couldn't load RT config file RT_SiteConfig.pm:
> 
> Insecure dependency in require while running with -T switch at /opt/rt4/lib/RT/Config.pm line 904.
> BEGIN failed--compilation aborted at t/01-db.t line 11.
> # Looks like your test exited with 2 before it could output anything.
> t/01-db.t ......... Dubious, test returned 2 (wstat 512, 0x200)
> 
> I've got RTHOME and PERL5LIB set so that it can find the RT installation and libs.
> 
> -- 
> http://www.linkedin.com/in/paultomblin
> http://careers.stackoverflow.com/ptomblin
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120328/1b87e916/attachment.htm>


More information about the rt-users mailing list