Re: Network connection

[email protected] (David Golden) Sun, 12 Nov 2017 12:01:52 -0500
Newsgroups perl.cpan.workers
Message-ID <CAOeq1c_n+naaZ7CgiQDhrhRrKqTbwvN86k-65dv_hpJGEjqFUA@mail.gmail.com>
--001a11470b601a4d60055dcc1eda
Content-Type: text/plain; charset="UTF-8"

There's https://metacpan.org/pod/Test::Internet and
https://metacpan.org/pod/Test::RequiresInternet .

I do recommend restricting those AUTOMATED_TESTING or AUTHOR_TESTING.

There's also the core-only approach like is used in HTTP::Tiny:
https://metacpan.org/source/DAGOLDEN/HTTP-Tiny-0.070/t/200_live.t

David


On Sun, Nov 12, 2017 at 9:59 AM, James E Keenan <[email protected]> wrote:

> Is there any code which is considered "best practice" for "skip_all unless
> I have an Internet connection"?
>
> For the first time I want to write a library whose tests will benefit from
> connection to an FTP server.  If there is some code that I could just drop
> in for situations where the test suite is run offline, that would be
> helpful.
>
> Thank you very much.
> Jim Keenan
>



-- 
David Golden <[email protected]> Twitter/IRC/GitHub: @xdg

--001a11470b601a4d60055dcc1eda
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div>There&#39;s <a href=3D"https://metacpan.org=
/pod/Test::Internet">https://metacpan.org/pod/Test::Internet</a> and <a hre=
f=3D"https://metacpan.org/pod/Test::RequiresInternet">https://metacpan.org/=
pod/Test::RequiresInternet</a> .<br><br></div>I do recommend restricting th=
ose AUTOMATED_TESTING or AUTHOR_TESTING.<br><br></div>There&#39;s also the =
core-only approach like is used in HTTP::Tiny: <a href=3D"https://metacpan.=
org/source/DAGOLDEN/HTTP-Tiny-0.070/t/200_live.t">https://metacpan.org/sour=
ce/DAGOLDEN/HTTP-Tiny-0.070/t/200_live.t</a><br><br></div>David<br><br></di=
v><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Sun, Nov 12,=
 2017 at 9:59 AM, James E Keenan <span dir=3D"ltr">&lt;<a href=3D"mailto:jk=
[email protected]" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<=
br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left=
:1px #ccc solid;padding-left:1ex">Is there any code which is considered &qu=
ot;best practice&quot; for &quot;skip_all unless I have an Internet connect=
ion&quot;?<br>
<br>
For the first time I want to write a library whose tests will benefit from =
connection to an FTP server.=C2=A0 If there is some code that I could just =
drop in for situations where the test suite is run offline, that would be h=
elpful.<br>
<br>
Thank you very much.<br>
Jim Keenan<br>
</blockquote></div><br><br clear=3D"all"><br>-- <br><div class=3D"gmail_sig=
nature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=
=3D"ltr"><div>David Golden &lt;<a href=3D"mailto:[email protected]" target=3D"_bla=
nk">[email protected]</a>&gt; Twitter/IRC/GitHub: @xdg</div></div></div></div></di=
v>
</div>

--001a11470b601a4d60055dcc1eda--