[libnet-mac-vendor-perl] 03/06: Refresh no-network-tests.patch.

gregor herrmann gregoa at debian.org
Sun Dec 25 21:38:26 UTC 2016


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libnet-mac-vendor-perl.

commit 78701ba9732161bbfcffed292b95641d06459e5a
Author: gregor herrmann <gregoa at debian.org>
Date:   Sun Dec 25 22:34:35 2016 +0100

    Refresh no-network-tests.patch.
---
 debian/patches/no-network-tests.patch | 70 ++++++++++++-----------------------
 1 file changed, 24 insertions(+), 46 deletions(-)

diff --git a/debian/patches/no-network-tests.patch b/debian/patches/no-network-tests.patch
index 16d8081..68d31bb 100644
--- a/debian/patches/no-network-tests.patch
+++ b/debian/patches/no-network-tests.patch
@@ -6,85 +6,63 @@ Last-Update: 2015-11-08
 
 --- a/t/fetch_oui_from_ieee.t
 +++ b/t/fetch_oui_from_ieee.t
-@@ -9,6 +9,8 @@
+@@ -11,6 +11,8 @@
  	};
  
  subtest fetch => sub {
 +	SKIP: {
-+	skip 'Tests require internet', 3 if $ENV{NO_NETWORK};
- 	my $array = Net::MAC::Vendor::fetch_oui_from_ieee( '00:01:02' );
- 	isa_ok( $array, ref [], "Got back array reference" );
- #	diag( "Array from fetch_oui_from_ieee is " . Dumper( $array ) );
-@@ -18,6 +20,7 @@
- 	like( $html, qr/3COM CORPORATION/, "Fetched 3M's OUI entry" );
- 
- 	unlike( $html, qr/PRIVATE/, "Still see PRIVATE in 3M entry" );
++	skip 'Tests require internet', 2 if $ENV{NO_NETWORK};
+ 	my $array = Net::MAC::Vendor::fetch_oui_from_ieee( '14:10:9F' );
+ 
+ 	SKIP: {
+@@ -21,6 +23,7 @@
+ 		my $html = join "\n", @$array;
+ 		like( $html, qr/Apple, Inc\./, "Fetched Apple's OUI entry" );
+ 		}
 +	}
  	};
  
  done_testing();
 --- a/t/fetch_oui.t
 +++ b/t/fetch_oui.t
-@@ -18,8 +18,11 @@
+@@ -19,9 +19,12 @@
+ 
  my $connected = 0;
  subtest connected => sub {
- 	my $tx = $class->ua->head( Net::MAC::Vendor::oui_url() );
 +	SKIP: {
 +	skip 'Tests require internet', 1 if $ENV{NO_NETWORK};
- 	$connected = $tx->success;
+ 	my $tx = $class->ua->head( Net::MAC::Vendor::oui_url() );
+ 	$connected = $tx->success && $tx->res->code;
  	ok( $connected, "Am connected to network [$connected]" );
 +	}
  	};
  
  my @ouis = qw(
-@@ -36,6 +39,7 @@
+@@ -38,6 +41,7 @@
  
  subtest fetch_apple => sub {
  	SKIP: {
 +		skip 'Tests require internet', 4 if $ENV{NO_NETWORK};
- 		skip "Can't connect to the IEEE web site", 4 unless $connected;
- 
  		my $parsed = Net::MAC::Vendor::fetch_oui( $ouis[0] );
-@@ -47,6 +51,8 @@
+ 		skip "Can't connect to the IEEE web site for $ouis[0]", 4 unless defined $parsed;
+ 
+@@ -49,6 +53,8 @@
  	};
  
  subtest fetch_all => sub {
 +	SKIP: {
 +	skip 'Tests require internet', 4 if $ENV{NO_NETWORK};
  	foreach my $oui ( @ouis ) {
- 		my $parsed = Net::MAC::Vendor::fetch_oui( $oui );
- 		isa_ok( $parsed, ref [] );
-@@ -54,6 +60,7 @@
- 			is( $parsed->[$i], $lines->[$i], "Line $i matches for $oui" );
- 			}
+ 		subtest $oui => sub {
+ 			my $parsed = Net::MAC::Vendor::fetch_oui( $oui );
+@@ -61,6 +67,7 @@
+ 				}
+ 			};
  		}
 +	}
  	};
  
  
---- a/t/rt79369.t
-+++ b/t/rt79369.t
-@@ -12,6 +12,7 @@
- 
- subtest html => sub {
- 	SKIP: {
-+ 		skip 'Tests require internet', 2 if $ENV{NO_NETWORK};
- 		my $array = Net::MAC::Vendor::lookup( $private_mac );
- 		skip 'Could not fetch MAC data', 2 unless defined $array;
- 
-@@ -26,9 +27,12 @@
- 
- 	ok( Net::MAC::Vendor::load_cache( $file ), 'Cache is loaded' );
- 
-+	SKIP: {
-+	skip 'Tests require internet', 2 if $ENV{NO_NETWORK};
- 	my $array = Net::MAC::Vendor::lookup( $private_mac );
- 	isa_ok( $array, ref [], "Got back array reference" );
- 	is( uc $array->[0], 'PRIVATE', 'This is a private entry' );
-+	}
- 	};
- 
- done_testing();
 --- a/t/run.t
 +++ b/t/run.t
 @@ -6,7 +6,9 @@
@@ -100,7 +78,7 @@ Last-Update: 2015-11-08
  open STDOUT, ">", \ my $output;
 --- a/t/load_cache.t
 +++ b/t/load_cache.t
-@@ -25,12 +25,15 @@
+@@ -37,12 +37,15 @@
  my ($fh, $filename) = tempfile( UNLINK => 1 );
  
  subtest load_cache_default_write => sub {
@@ -118,7 +96,7 @@ Last-Update: 2015-11-08
  subtest created_source => sub {
 --- a/t/oui.t
 +++ b/t/oui.t
-@@ -20,8 +20,11 @@
+@@ -22,8 +22,11 @@
  	};
  
  subtest fetch_url => sub {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-mac-vendor-perl.git



More information about the Pkg-perl-cvs-commits mailing list