Skip Menu |

This queue is for tickets about the Net-OpenSSH CPAN distribution.

Report information
The Basics
Id: 107458
Status: rejected
Priority: 0/
Queue: Net-OpenSSH

People
Owner: salva [...] cpan.org
Requestors: SZABGAB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Allow for unattended installation
I think it would be better if the tests requiring user interaction would be skipped by default and only executed if the user has opted in somehow. (e.g. environment variable)
This is a duplicate of bug #87803 (https://rt.cpan.org/Ticket/Display.html?id=87803). But anyway, the tests have a timeout. If the connection is not established in 15 seconds they are entirely skipped. Isn't that timeout working for you?
On Fri Oct 02 03:03:09 2015, SALVA wrote: Show quoted text
> This is a duplicate of bug #87803 > (https://rt.cpan.org/Ticket/Display.html?id=87803). > > But anyway, the tests have a timeout. If the connection is not > established in 15 seconds they are entirely skipped. Isn't that > timeout working for you?
Apparently the previous time I have stopped the process before the timeout. It worked now. So this is less of an issue now. (Actually when I first saw that prompt I thought it wants to install something as root.) So I still think this should be skipped by default and only enabled if the user asked for it. I figured out that one could use prompt() in Makefile.PL to ask the user my $test_pw = prompt("Shall I test with password? [y|N]", 'n'); but I have not figured out yet, how to pass this information to the tests. e.g. How to set an environment variable in Makefile.PL that will be seen during the "make test" phase.
I guess one solution would be to add plan skip_all => 'Set the TEST_SSH to true to enable this test. eg. TEST_SSH=1 make test' if not $ENV{TEST_SSH}; to the t/1_run.t
Subject: Re: [rt.cpan.org #107458] Allow for unattended installation
Date: Fri, 2 Oct 2015 08:15:40 +0000 (UTC)
To: "bug-Net-OpenSSH [...] rt.cpan.org" <bug-Net-OpenSSH [...] rt.cpan.org>
From: Salvador Fandino <sfandino [...] yahoo.com>
Show quoted text
----- Original Message -----
> From: Gabor Szabo via RT <bug-Net-OpenSSH@rt.cpan.org> > To: > Cc: > Sent: Friday, October 2, 2015 9:11 AM > Subject: [rt.cpan.org #107458] Allow for unattended installation > > Queue: Net-OpenSSH > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=107458 > > > On Fri Oct 02 03:03:09 2015, SALVA wrote:
>> This is a duplicate of bug #87803 >> (https://rt.cpan.org/Ticket/Display.html?id=87803). >> >> But anyway, the tests have a timeout. If the connection is not >> established in 15 seconds they are entirely skipped. Isn't that >> timeout working for you?
> > Apparently the previous time I have stopped the process before the timeout. It > worked now. So this is less of an issue now. (Actually when I first saw that > prompt I thought it wants to install something as root.) > So I still think this should be skipped by default and only enabled if the user > asked for it. > > I figured out that one could use prompt() in Makefile.PL to ask the user > > > my $test_pw = prompt("Shall I test with password? [y|N]", > 'n');
The thing is that leaving the test optional in the end means no testing at all. Anyway, the test scripts already inform the user (admittedly quite succinctly) that they are trying to connect to localhost and that there is a timeout of 15s. Maybe you are using a CPAN client as cpanm that hides test output from you.
> but I have not figured out yet, how to pass this information to the tests. > e.g. How to set an environment variable in Makefile.PL that will be seen during
> the "make test" phase
You can't do that. Environment variables can only be set for the current and descendant processes, not for parents or siblings. You can customize the generation of the Makefile "test" target in Makefile.PL in order to pass this bit of information is passed in some other way to the test scripts but mangling the Makefile is usually a pain.