File: 01_disable_network_tests.diff

package info (click to toggle)
libwww-bugzilla-perl 1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 148 kB
  • ctags: 27
  • sloc: perl: 805; makefile: 9
file content (33 lines) | stat: -rw-r--r-- 810 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Description: disable tests requiring Internet
 This disables tests requiring Internet. It was inspired by
 previous work by Bart Martens, including a patch to accomplish
 something similar.
Author: Jonathan Yu <jawnsy@cpan.org>
Origin: vendor
Forwarded: no
--- a/t/search.t
+++ b/t/search.t
@@ -9,6 +9,10 @@
 my $email    = 'bmc@shmoo.com';
 my $password = 'pileofcrap';
 
+unless ($ENV{HAS_INTERNET}) {
+  plan skip_all => 'Set HAS_INTERNET to enable tests requiring Internet';
+}
+
 verify_host($server);
 
 plan tests => 22;
--- a/t/www_bugzilla.t
+++ b/t/www_bugzilla.t
@@ -7,6 +7,10 @@
 
 my $server = 'landfill.bugzilla.org/bugzilla-3.4-branch';
 
+unless ($ENV{HAS_INTERNET}) {
+  plan skip_all => 'Set HAS_INTERNET to enable tests requiring Internet';
+}
+
 verify_host($server);
 plan(tests => 35);