From patchwork Thu Aug 20 17:28:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 3384 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 4BXWpy2RQgz3x1f for ; Thu, 20 Aug 2020 17:29:14 +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) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4BXWpx02lszvY; Thu, 20 Aug 2020 17:29:12 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4BXWpw6Nr2z30WH; Thu, 20 Aug 2020 17:29:12 +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 4BXWpv484lz2y0p; Thu, 20 Aug 2020 17:29:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (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 4BXWpv16CXzv9; Thu, 20 Aug 2020 17:29:11 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1597944551; 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: in-reply-to:in-reply-to:references:references; bh=h1K7Vvd/btAepuSV24Aret4GaDQp4xe9trdoTz8V9eQ=; b=42/g2r2G1rhdAzKx3TqKn46+oStBpmRY2313uzEdfdHhxIXoRe/xMV3xhevYK1zk/RFJAi TZXx5v/n+Vm33PCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1597944551; 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: in-reply-to:in-reply-to:references:references; bh=h1K7Vvd/btAepuSV24Aret4GaDQp4xe9trdoTz8V9eQ=; b=u7IknizxqB8NKBeq3Eg5hunG4yT0k77ePkLU8BREylaPwf3IHyrY0BIDKV1yrmZrQoKRsR OtJjw7ppNYukVWVFm5Wl3lWd7AvXpMrlKmKkaRuhUvB8s1oaGNhkYTxsUHrpFcTV/qHykk u7ogA2Bw08fy8yxQqdfVoPMAmhWvwyuSxvgjJLZ0EAPtnE3giExnAoh2V/uy3rcy6GbmJ0 FKHlmF1gvYazB/cX7pNn5IUIyKOQOqLEuI/CPC48gGTt4hmhzM8wH8QeM1eJTs7RSf1vqW EXmAIijdPIyVqdBA7E23ZJfqX6asst8mgBQreLVMjTnOWg7pko0r1w6OiZquvA== From: Stefan Schantl To: location@lists.ipfire.org Subject: [PATCH 3/3] perl: Add test for the database_countries() function. Date: Thu, 20 Aug 2020 19:28:56 +0200 Message-Id: <20200820172856.6983-3-stefan.schantl@ipfire.org> In-Reply-To: <20200820172856.6983-1-stefan.schantl@ipfire.org> References: <20200820172856.6983-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Authentication-Results: mail01.ipfire.org; auth=pass 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: , Cc: development@lists.ipfire.org 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 3ba2d8f..ec7f1e0 100644 --- a/src/perl/t/Location.t +++ b/src/perl/t/Location.t @@ -12,7 +12,7 @@ use warnings; my $testdb = $ENV{'database'}; my $keyfile = $ENV{'keyfile'}; -use Test::More tests => 7; +use Test::More tests => 8; BEGIN { use_ok('Location') }; ######################### @@ -56,3 +56,6 @@ if(defined($as_number)) { fail("Test 8 - Lookup Autonomous System Number for add $as_number = &Location::lookup_asn($db, "a.b.c.d"); if(defined($as_number)) { fail("Test 9 - Lookup Autonomous System Number for invalid address.") } + +my @locations = &Location::database_countries($db); +ok(@locations != 0, "Test 10 - Get database countries.");