use strict;
use warnings;
-use Test::More tests => 23;
+use Test::More tests => 24;
BEGIN { use_ok('IPSet') };
#########################
# Array with addresses to be added to the testset.
my @addresses = ("1.1.1.1", "2.2.2.2");
+# Array with ports to be added to the portset.
+my @ports = ("22", "53", "80", "443");
+
# Name of the renamed set.
my $setname_renamed = "TEST_RENAMED";
$exists = &IPSet::setname_exists($session, $portset{'name'});
ok($exists, "The portset exists.");
+# Add all ports from the array to the portset.
+foreach my $port (@ports) {
+ &IPSet::add_port($session, $portset{'name'}, $port);
+}
+
+# Grab set data from portset.
+$data = &IPSet::get_set_data($session, $portset{'name'});
+ok($data->{entries} eq scalar(@ports), "All ports added successfully to the set");
+
# Destroy the port set.
&IPSet::delete_set($session, $portset{'name'});