File: network-tests.patch

package info (click to toggle)
libhttp-oai-perl 4.03-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 416 kB
  • ctags: 326
  • sloc: perl: 2,531; xml: 224; makefile: 12
file content (29 lines) | stat: -rw-r--r-- 894 bytes parent folder | download | duplicates (4)
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
Description: Skip more tests which need network access.
 These tests at least try to do a DNS lookup.
Origin: vendor
Bug-Debian: https://bugs.debian.org/830356
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2016-07-15
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=116184
Bug: https://rt.cpan.org/Ticket/Display.html?id=116184

--- a/t/listidentifiers.t
+++ b/t/listidentifiers.t
@@ -17,6 +17,11 @@
 
 ok(1);
 
+my $dotest = defined($ENV{"HTTP_OAI_NETTESTS"});
+
+SKIP : {
+	skip "Skipping net tests (set HTTP_OAI_NETTESTS env. variable to enable)", 2 unless $dotest;
+
 my $ha = HTTP::OAI::Harvester->new(baseURL=>'http://domain.invalid/');
 $r = $ha->ListRecords(metadataPrefix=>'oai_dc', from=>'2005-01-01');
 my $uri = URI->new($r->request->uri);
@@ -24,3 +29,5 @@
 ok($args{metadataPrefix} eq 'oai_dc' && $args{'from'} eq '2005-01-01','Request arguments');
 
 ok(1);
+
+}