<html><head></head><body bgcolor="#FFFFFF"><div>In your script add:</div><div><br></div><div>use libs <span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">/opt/rt4/lib/</span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">To see if for some reason your env vars  aren't seeing the RT path. <br></span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">It "may" be use lib and not use libs. I'm not at workstation to log in and check. <br></span></div><div><div><br></div><div>Sent from my mobile device. </div></div><div><br>On Mar 28, 2012, at 5:56 PM, Paul Tomblin <<a href="mailto:ptomblin@xcski.com">ptomblin@xcski.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>Is it possible to do a perl unit test that uses the RT config file?  I tried this is my test:<div><br clear="all"><div><div>#!perl -T</div><div><br></div><div>use Test::More tests => 1;</div><div><br></div><div>use RT;</div>
<div><br></div><div>BEGIN {</div><div>        RT::LoadConfig();</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>use_ok( 'RTx:FooBar' );</div><div>};</div></div><div><br></div><div>And I get some errors about being unable to use RT_SiteConfig.pm:</div>
<div><div>t/01-db.t ......... Couldn't load RT config file RT_SiteConfig.pm:</div><div><br></div><div>Insecure dependency in require while running with -T switch at /opt/rt4/lib/RT/Config.pm line 904.</div><div>BEGIN failed--compilation aborted at t/01-db.t line 11.</div>
<div># Looks like your test exited with 2 before it could output anything.</div><div>t/01-db.t ......... Dubious, test returned 2 (wstat 512, 0x200)</div></div><div><br></div><div>I've got RTHOME and PERL5LIB set so that it can find the RT installation and libs.</div>
<div><br></div>-- <br><a href="http://www.linkedin.com/in/paultomblin">http://www.linkedin.com/in/paultomblin</a><br><a href="http://careers.stackoverflow.com/ptomblin">http://careers.stackoverflow.com/ptomblin</a><br><br>

</div>
</div></blockquote></body></html>