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
|
From: intrigeri <intrigeri@boum.org>
Date: Wed, 29 Jun 2016 13:50:08 +0000
Subject: Survive systems without a default route.
When using cowbuilder and USENETWORK=no, 'route -n' returns 0 but
$table_ref->default_route() is undefined.
This shouldn't make the test suite fail, so skip the tests on errors.
This is not an optimal solution as other errors might now
go unnoticed.
Bug-Debian: https://bugs.debian.org/788758
---
t/50-integration.t | 3 +++
1 file changed, 3 insertions(+)
diff --git a/t/50-integration.t b/t/50-integration.t
index e4677c2..efa096d 100644
--- a/t/50-integration.t
+++ b/t/50-integration.t
@@ -27,6 +27,9 @@ if ( !eval { $table_ref = Net::Route::Table->from_system(); 1 } )
diag_system_command();
skip "error getting routes: $EVAL_ERROR", 2;
}
+if ( !defined($table_ref->default_route()) ) {
+ skip "error getting default route", 2;
+}
my $default_network = NetAddr::IP->new( '0.0.0.0', '0.0.0.0' );
|