From patchwork Tue Oct 1 06:24:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 2450 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 46j8Pf20swz3yyK for ; Tue, 1 Oct 2019 06:24:38 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 46j8Pd2vYBz3L4; Tue, 1 Oct 2019 06:24:37 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 46j8Pd1GfGz2ygP; Tue, 1 Oct 2019 06:24:37 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 46j8Pb3cFCz2yCr; Tue, 1 Oct 2019 06:24:35 +0000 (UTC) Received: from tuxedo.stevee (unknown [46.125.250.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 46j8Pb0QTkz2ch; Tue, 1 Oct 2019 06:24:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1569911075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=DVG9BfuplhVD655l31JU9VV0QLoQLv660Ux5rYSjTNA=; b=k1t6EgCEvDljzZB6vMdfppeOponCfeL74pTY63bsW8kcoIXGbHhSlE/oHdXce8SsCwtHZw b1zsb8iqhRAMcueE/5wyIANlVdVNavDW5Acp53TLSdFmCbWmd8amSFCrDwPY99OwjWwHrW f6bCHoMl3Amqaf6mWKCtoKoisxVq8mnAcCKkOw5ORzlxa0G1Ioys2iuO1esmOHYXM3XN7q gjGxagXwMC1mfli3Sq3mjg/Ue1SEbbQBj1GzO/0uh0mx/3bVIff4qEHGl/IfDSozTnhTj0 Pddb+RJj3OI5HGxOU4ASD8J6HZhxVfOP9bD+pjSNVjxgmbbiZnuiTXLS2/SrXA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1569911075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=DVG9BfuplhVD655l31JU9VV0QLoQLv660Ux5rYSjTNA=; b=UlZAh0opYJ4Zd6j5UGbDjNz55xNfOtE8G/tUVplJp+O+0tqY3Rti4fEqOVlEa+mgzScf33 3SgR/6N0SJnyugBQ== From: Stefan Schantl To: development@lists.ipfire.org, location@lists.ipfire.org Subject: [PATCH] perl: Testsuite: Add test for lookup_asn() Date: Tue, 1 Oct 2019 08:24:29 +0200 Message-Id: <20191001062429.4931-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=stevee smtp.mailfrom=stefan.schantl@ipfire.org X-BeenThere: location@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: location-bounces@lists.ipfire.org Sender: "Location" Signed-off-by: Stefan Schantl --- src/perl/t/Location.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/perl/t/Location.t b/src/perl/t/Location.t index aef15c3..af5e258 100644 --- a/src/perl/t/Location.t +++ b/src/perl/t/Location.t @@ -11,7 +11,7 @@ use warnings; # Where to find the test database. my $testdb = "../../testdata/test.db"; -use Test::More tests => 5; +use Test::More tests => 6; BEGIN { use_ok('Location') }; ######################### @@ -36,3 +36,6 @@ ok($description eq "This is a geo location database", "Test 3 - Get Database Des my $country_code = &Location::lookup_country_code($db, $address); ok($country_code eq "DE", "Test 4 - Lookup country code for $address"); + +my $as_number = &Location::lookup_asn($db, $address); +ok($as_number eq "204867", "Test 5 - Lookup Autonomous System for $address");