Skip Menu |

This queue is for tickets about the RT-Extension-REST2 CPAN distribution.

Report information
The Basics
Id: 129492
Status: resolved
Priority: 0/
Queue: RT-Extension-REST2

People
Owner: Nobody in particular
Requestors: PUCK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 1.04
  • 1.06
Fixed in: (no value)



Subject: Tests fail if RT is installed
Hey, I just spent some time tearing my hair out because I ran "perl Makefile.PL". Turns out it modified t/lib/RT/Extension/REST2/Test.pm and used the RT modules installed on the system (my dev box). This caused 'make test' to fail as it tried to load the system level config, and since I don't run my tests as root, it failed all over the show. I finally decided to try editing t/lib/RT/Extension/REST2/Test.pm and point it towards my git clone of the RT code base. That worked! Would it be possible to have this ignore the system installed config file? Cheers, Andrew
On Thu May 09 00:16:47 2019, PUCK wrote: Show quoted text
> Hey, > > I just spent some time tearing my hair out because I ran "perl > Makefile.PL". Turns out it modified t/lib/RT/Extension/REST2/Test.pm > and used the RT modules installed on the system (my dev box). This > caused 'make test' to fail as it tried to load the system level > config, and since I don't run my tests as root, it failed all over the > show. > > I finally decided to try editing t/lib/RT/Extension/REST2/Test.pm and > point it towards my git clone of the RT code base. > > That worked! > > Would it be possible to have this ignore the system installed config > file?
Hi Andrew, Yes, that Test.pm file is generated from Test.pm.in and some information like paths are updated. You can try setting the RTHOME environment variable to point to the RT you want it to use. We also have a branch with some updates to the testing infrastructure: https://github.com/bestpractical/rt-extension-rest2/tree/move-test-files In that branch you can run tests with: prove -l xt/* Do those tests use the correct libraries for you? Jim
Subject: Re: [rt.cpan.org #129492] Tests fail if RT is installed
Date: Fri, 10 May 2019 12:30:43 +1200
To: bug-RT-Extension-REST2 [...] rt.cpan.org
From: Andrew Ruthven <andrew [...] etc.gen.nz>
Hi Jim, On Thu, 2019-05-09 at 15:07 -0400, Best Practical Solutions »|« via RT wrote: Show quoted text
> Yes, that Test.pm file is generated from Test.pm.in and some > information like paths are updated. You can try setting the RTHOME > environment variable to point to the RT you want it to use.
Setting $RTHOME provides a working Test.pm file. Show quoted text
> We also have a branch with some updates to the testing > infrastructure: > > https://github.com/bestpractical/rt-extension-rest2/tree/move-test-files > > In that branch you can run tests with: prove -l xt/* > > Do those tests use the correct libraries for you?
Using this branch, when I run "perl Makefile.PL" it generates a Test.pm file which contains: use lib qw(/usr/local/share/request-tracker4/lib /usr/share/request- tracker4/lib); Which doesn't work as that only contains one. extension This time around $RTHOME is ignored. Cheers, Andrew -- Andrew Ruthven, Wellington, New Zealand andrew@etc.gen.nz | linux.conf.au 2020, Gold Coast, AU https://catalystcloud.nz | https://lca2020.linux.org.au
Hi Andrew You still need to set RTHOME to select the testing RT you want for lib/RT/Extension/REST2/Test.pm. I assume the branch works for you when RTHOME is set correctly? Thanks! -sunnavy On Thu May 09 20:36:54 2019, andrew@etc.gen.nz wrote: Show quoted text
> Hi Jim, > > On Thu, 2019-05-09 at 15:07 -0400, Best Practical Solutions »|« via RT > wrote:
> > Yes, that Test.pm file is generated from Test.pm.in and some > > information like paths are updated. You can try setting the RTHOME > > environment variable to point to the RT you want it to use.
> > Setting $RTHOME provides a working Test.pm file. >
> > We also have a branch with some updates to the testing > > infrastructure: > > > > https://github.com/bestpractical/rt-extension-rest2/tree/move-test-files > > > > In that branch you can run tests with: prove -l xt/* > > > > Do those tests use the correct libraries for you?
> > Using this branch, when I run "perl Makefile.PL" it generates a Test.pm > file which contains: > > use lib qw(/usr/local/share/request-tracker4/lib /usr/share/request- > tracker4/lib); > > Which doesn't work as that only contains one. extension > > This time around $RTHOME is ignored. > > Cheers, > Andrew >
Subject: Re: [rt.cpan.org #129492] Tests fail if RT is installed
Date: Mon, 20 May 2019 21:48:16 +1200
To: bug-RT-Extension-REST2 [...] rt.cpan.org
From: Andrew Ruthven <andrew [...] etc.gen.nz>
Hey Jim, Yes it does, but only after I removed the stale t/lib/RT/Extension/REST2/Test.pm because the test files still have this line: use lib 't/lib'; Ah, but I see you've already committed a fix to remove this! So, yes, working for me now. Thanks, Andrew On Tue, 2019-05-14 at 11:44 -0400, sunnavy via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=129492 > > > Hi Andrew > > You still need to set RTHOME to select the testing RT you want for > lib/RT/Extension/REST2/Test.pm. I assume the branch works for you > when RTHOME is set correctly? > > Thanks! > > -sunnavy > > On Thu May 09 20:36:54 2019, andrew@etc.gen.nz wrote:
> > Hi Jim, > > > > On Thu, 2019-05-09 at 15:07 -0400, Best Practical Solutions »|« via > > RT > > wrote:
> > > Yes, that Test.pm file is generated from Test.pm.in and some > > > information like paths are updated. You can try setting the > > > RTHOME > > > environment variable to point to the RT you want it to use.
> > > > Setting $RTHOME provides a working Test.pm file. > >
> > > We also have a branch with some updates to the testing > > > infrastructure: > > > > > > https://github.com/bestpractical/rt-extension-rest2/tree/move-tes > > > t-files > > > > > > In that branch you can run tests with: prove -l xt/* > > > > > > Do those tests use the correct libraries for you?
> > > > Using this branch, when I run "perl Makefile.PL" it generates a > > Test.pm > > file which contains: > > > > use lib qw(/usr/local/share/request-tracker4/lib > > /usr/share/request- > > tracker4/lib); > > > > Which doesn't work as that only contains one. extension > > > > This time around $RTHOME is ignored. > > > > Cheers, > > Andrew > >
> >
-- Andrew Ruthven, Wellington, New Zealand andrew@etc.gen.nz              | linux.conf.au 2020, Gold Coast, AU Catalyst Cloud:  |   https://lca2020.linux.org.au/ https://catalystcloud.nz |