use strict;
use warnings;
-use Test::More tests => 21;
+use Test::More tests => 23;
BEGIN { use_ok('IPSet') };
#########################
"maxelem" => "10",
);
+my %portset = (
+ "name" => "PORTTEST",
+ "type" => "bitmap:port",
+);
+
# Array with addresses to be added to the testset.
my @addresses = ("1.1.1.1", "2.2.2.2");
# CLEANUP: Delete the remaining set.
&IPSet::delete_set($session, $testset{'name'});
+# Create the testset for ports.
+my $create_port_set = &IPSet::create_set($session, $portset{'name'}, $portset{'type'}, "0", "0");
+ok($create_port_set, "Sucessfully created set: $portset{'name'}");
+
+# Check if the testset exists.
+$exists = &IPSet::setname_exists($session, $portset{'name'});
+ok($exists, "The portset exists.");
+
+# Destroy the port set.
+&IPSet::delete_set($session, $portset{'name'});
+
# Destroy the ipset session.
&IPSet::DESTROY($session);