= switch all tests to use custom ports which are less likely to overlap

git-svn-id: http://repo.ham.fi/svn/aprsc/trunk@363 3ce903b1-3385-4e86-93cd-f9a4a239f7ac
This commit is contained in:
Heikki Hannikainen 2012-05-28 21:38:25 +00:00
parent 9270576d6c
commit 98d039c430
14 changed files with 44 additions and 44 deletions

View File

@ -37,8 +37,8 @@ my $ret;
ok(1); # modules load fine
my $iss1 = new Ham::APRS::IS_Fake('127.0.0.1:10153', 'CORE1');
my $iss2 = new Ham::APRS::IS_Fake('127.0.0.1:10154', 'CORE2');
my $iss1 = new Ham::APRS::IS_Fake('127.0.0.1:54153', 'CORE1');
my $iss2 = new Ham::APRS::IS_Fake('127.0.0.1:54154', 'CORE2');
ok(1); # there's a working socket
$iss1->bind_and_listen();
@ -66,7 +66,7 @@ ok($read1, qr/^user TESTING pass 31421 /, "Did not receive 'user' login command
ok($read2, qr/^user TESTING pass 31421 /, "Did not receive 'user' login command on connection 2");
# create client connection
my $cl = new Ham::APRS::IS("localhost:10152", 'CL1ENT');
my $cl = new Ham::APRS::IS("localhost:55152", 'CL1ENT');
ok(defined $cl, 1, "Failed to initialize Ham::APRS::IS");
$ret = $cl->connect('retryuntil' => 8);
ok($ret, 1, "Failed to connect to the server: " . $cl->{'error'});

View File

@ -19,7 +19,7 @@ my $ret;
ok(1); # modules load fine
my $iss1 = new Ham::APRS::IS_Fake('127.0.0.1:10153', 'CORE1');
my $iss1 = new Ham::APRS::IS_Fake('127.0.0.1:54153', 'CORE1');
ok(1); # there's a working socket
$iss1->bind_and_listen();
@ -50,7 +50,7 @@ warn sprintf("\ntimeout on uplink socket took %.3f s, should take 10s\n", $t_dif
ok($t_dif > 9 && $t_dif < 15);
# create client connection
my $cl = new Ham::APRS::IS("localhost:10152", 'CL1ENT');
my $cl = new Ham::APRS::IS("localhost:55152", 'CL1ENT');
ok(defined $cl, 1, "Failed to initialize Ham::APRS::IS");
$ret = $cl->connect('retryuntil' => 8);
ok($ret, 1, "Failed to connect to the server: " . $cl->{'error'});

View File

@ -46,13 +46,13 @@ ClientTimeout 20s
# msgonly - messages only
# userfilter - user-specified filters
#
Listen "Messages only" messageonly tcp 0.0.0.0 1314 t/m
Listen "Full feed with CWOP" fullfeed tcp 0.0.0.0 10152 t/c*
Listen "Igate port" igate tcp 0.0.0.0 14580
Listen "Client-only port" clientonly tcp 0.0.0.0 14581
Listen "Messages only" messageonly tcp 0.0.0.0 55314 t/m
Listen "Full feed with CWOP" fullfeed tcp 0.0.0.0 55152 t/c*
Listen "Igate port" igate tcp 0.0.0.0 55580
Listen "Client-only port" clientonly tcp 0.0.0.0 55581
Uplink full1 multiro tcp 127.0.0.1 10153
Uplink full2 multiro tcp 127.0.0.1 10154
Uplink full1 multiro tcp 127.0.0.1 54153
Uplink full2 multiro tcp 127.0.0.1 54154
### Internals ############
# Only use 3 threads in these basic tests, to keep startup/shutdown times

View File

@ -45,10 +45,10 @@ ClientTimeout 48h
# msgonly - messages only
# userfilter - user-specified filters
#
Listen "Messages only" messageonly tcp 0.0.0.0 1314 t/m
Listen "Full feed with CWOP" fullfeed tcp 0.0.0.0 10152 t/c*
Listen "Igate port" igate tcp 0.0.0.0 14580
Listen "Client-only port" clientonly tcp 0.0.0.0 14581
Listen "Messages only" messageonly tcp 0.0.0.0 55314 t/m
Listen "Full feed with CWOP" fullfeed tcp 0.0.0.0 55152 t/c*
Listen "Igate port" igate tcp 0.0.0.0 55580
Listen "Client-only port" clientonly tcp 0.0.0.0 55581
Uplink full1 full tcp 127.0.0.1 10153

View File

@ -45,13 +45,13 @@ ClientTimeout 48h
# msgonly - messages only
# userfilter - user-specified filters
#
Listen "Messages only" messageonly tcp 0.0.0.0 1314 t/m
Listen "Full feed with CWOP" fullfeed tcp 0.0.0.0 10152 t/c*
Listen "Igate port" igate tcp 0.0.0.0 14580
Listen "Client-only port" clientonly tcp 0.0.0.0 14581
Listen "Messages only" messageonly tcp 0.0.0.0 55314 t/m
Listen "Full feed with CWOP" fullfeed tcp 0.0.0.0 55152 t/c*
Listen "Igate port" igate tcp 0.0.0.0 55580
Listen "Client-only port" clientonly tcp 0.0.0.0 55581
Uplink core1 multiro tcp 127.0.0.1 10153
Uplink core2 multiro tcp ::1 10153
Uplink core1 multiro tcp 127.0.0.1 54153
Uplink core2 multiro tcp ::1 54153
### Internals ############
# Only use 3 threads in these basic tests, to keep startup/shutdown times

View File

@ -15,7 +15,7 @@ ok(defined $p, 1, "Failed to initialize product runner");
ok($p->start(), 1, "Failed to start product");
# connect to the server
my $is = new Ham::APRS::IS("localhost:10152", "N0CALL");
my $is = new Ham::APRS::IS("localhost:55152", "N0CALL");
ok(defined $is, 1, "Failed to initialize Ham::APRS::IS");
my $ret = $is->connect('retryuntil' => 8);

View File

@ -21,10 +21,10 @@ ok($p->start(), 1, "Failed to start product");
my $login = "N0CALL-1";
my $server_call = "TESTING";
my $i_tx = new Ham::APRS::IS("localhost:14580", $login);
my $i_tx = new Ham::APRS::IS("localhost:55580", $login);
ok(defined $i_tx, 1, "Failed to initialize Ham::APRS::IS");
my $i_rx = new Ham::APRS::IS("localhost:10152", "N0CALL-2");
my $i_rx = new Ham::APRS::IS("localhost:55152", "N0CALL-2");
ok(defined $i_rx, 1, "Failed to initialize Ham::APRS::IS");
my $ret;

View File

@ -18,13 +18,13 @@ ok($p->start(), 1, "Failed to start product");
my $login = "N0CALL-1";
my $server_call = "TESTING";
my $i_tx = new Ham::APRS::IS("localhost:14581", $login);
my $i_tx = new Ham::APRS::IS("localhost:55581", $login);
ok(defined $i_tx, 1, "Failed to initialize Ham::APRS::IS");
my $i_rx = new Ham::APRS::IS("localhost:10152", "N0CALL-2");
my $i_rx = new Ham::APRS::IS("localhost:55152", "N0CALL-2");
ok(defined $i_rx, 1, "Failed to initialize Ham::APRS::IS");
# connect, initially to the client-only port 14581
# connect, initially to the client-only port 55581
my $ret;
$ret = $i_tx->connect('retryuntil' => 8);
@ -96,14 +96,14 @@ istest::txrx(\&ok, $i_tx, $i_rx,
$ret = $i_tx->disconnect();
ok($ret, 1, "Failed to disconnect from the server: " . $i_rx->{'error'});
$i_tx = new Ham::APRS::IS("localhost:10152", $login);
$i_tx = new Ham::APRS::IS("localhost:55152", $login);
ok(defined $i_tx, 1, "Failed to initialize Ham::APRS::IS");
$ret = $i_tx->connect('retryuntil' => 8);
ok($ret, 1, "Failed to connect to the server: " . $i_tx->{'error'});
# for loop testing, also make a second connection
my $login_second = "MYC4LL-5";
$i_tx2 = new Ham::APRS::IS("localhost:10152", $login_second);
$i_tx2 = new Ham::APRS::IS("localhost:55152", $login_second);
ok(defined $i_tx2, 1, "Failed to initialize Ham::APRS::IS");
$ret = $i_tx2->connect('retryuntil' => 8);
ok($ret, 1, "Failed to connect twice to the server: " . $i_tx->{'error'});

View File

@ -17,10 +17,10 @@ ok($p->start(), 1, "Failed to start product");
$tx_call = "N0CALL-1";
$server_call = "TESTING";
$i_tx = new Ham::APRS::IS("localhost:10152", $tx_call, 'nopass' => 1);
$i_tx = new Ham::APRS::IS("localhost:55152", $tx_call, 'nopass' => 1);
ok(defined $i_tx, 1, "Failed to initialize Ham::APRS::IS");
$i_rx = new Ham::APRS::IS("localhost:10152", "N0CALL-2", 'nopass' => 1);
$i_rx = new Ham::APRS::IS("localhost:55152", "N0CALL-2", 'nopass' => 1);
ok(defined $i_rx, 1, "Failed to initialize Ham::APRS::IS");
# connect

View File

@ -10,11 +10,11 @@ use Ham::APRS::IS;
use Ham::APRS::IS_Fake;
ok(1); # If we made it this far, we're ok.
my $iss1 = new Ham::APRS::IS_Fake('127.0.0.1:10153', 'CORE1');
my $iss1 = new Ham::APRS::IS_Fake('127.0.0.1:54153', 'CORE1');
ok(defined $iss1, 1, "Test failed to initialize listening server socket");
$iss1->bind_and_listen();
my $iss6 = new Ham::APRS::IS_Fake('[::1]:10153', 'CORE6');
my $iss6 = new Ham::APRS::IS_Fake('[::1]:54153', 'CORE6');
ok(defined $iss6, 1, "Test failed to initialize listening server socket on IPv6");
$iss6->bind_and_listen();
@ -25,7 +25,7 @@ ok($p->start(), 1, "Failed to start product");
my $login = "N0CALL-1";
my $server_call = "TESTING";
my $i_rx = new Ham::APRS::IS("localhost:10152", $login);
my $i_rx = new Ham::APRS::IS("localhost:55152", $login);
ok(defined $i_rx, 1, "Failed to initialize Ham::APRS::IS");
my $is1 = $iss1->accept();

View File

@ -38,11 +38,11 @@ BEGIN {
ok(1); # If we made it this far, we're ok.
my $iss1 = new Ham::APRS::IS_Fake('127.0.0.1:10153', 'CORE1');
my $iss1 = new Ham::APRS::IS_Fake('127.0.0.1:54153', 'CORE1');
ok(defined $iss1, 1, "Test failed to initialize listening server socket");
$iss1->bind_and_listen();
my $iss6 = new Ham::APRS::IS_Fake('[::1]:10153', 'CORE6');
my $iss6 = new Ham::APRS::IS_Fake('[::1]:54153', 'CORE6');
ok(defined $iss6, 1, "Test failed to initialize listening server socket on IPv6");
$iss6->bind_and_listen();
@ -53,7 +53,7 @@ ok($p->start(), 1, "Failed to start product");
my $login = "N0CALL-1";
my $server_call = "TESTING";
my $i_rx = new Ham::APRS::IS("localhost:10152", $login);
my $i_rx = new Ham::APRS::IS("localhost:55152", $login);
ok(defined $i_rx, 1, "Failed to initialize Ham::APRS::IS");
my $is1 = $iss1->accept();

View File

@ -38,11 +38,11 @@ BEGIN {
ok(1); # If we made it this far, we're ok.
my $iss1 = new Ham::APRS::IS_Fake('127.0.0.1:10153', 'CORE1');
my $iss1 = new Ham::APRS::IS_Fake('127.0.0.1:54153', 'CORE1');
ok(defined $iss1, 1, "Test failed to initialize listening server socket");
$iss1->bind_and_listen();
my $iss6 = new Ham::APRS::IS_Fake('[::1]:10153', 'CORE6');
my $iss6 = new Ham::APRS::IS_Fake('[::1]:54153', 'CORE6');
ok(defined $iss6, 1, "Test failed to initialize listening server socket on IPv6");
$iss6->bind_and_listen();
@ -53,7 +53,7 @@ ok($p->start(), 1, "Failed to start product");
my $login = "N0CALL-1";
my $server_call = "TESTING";
my $i_rx = new Ham::APRS::IS("localhost:10152", $login);
my $i_rx = new Ham::APRS::IS("localhost:55152", $login);
ok(defined $i_rx, 1, "Failed to initialize Ham::APRS::IS");
my $is1 = $iss1->accept();

View File

@ -22,12 +22,12 @@ ok($p->start(), 1, "Failed to start product");
my $login = "N0CALL-1";
my $server_call = "TESTING";
my $i_tx = new Ham::APRS::IS("localhost:14580", $login);
my $i_tx = new Ham::APRS::IS("localhost:55580", $login);
ok(defined $i_tx, 1, "Failed to initialize Ham::APRS::IS");
# first filter is for uncompressed packet, second for compressed,
# third for mic-e, fourth for prefix filter test
my $i_rx = new Ham::APRS::IS("localhost:14581", "N0CALL-2",
my $i_rx = new Ham::APRS::IS("localhost:55581", "N0CALL-2",
'filter' => 'r/60.4752/25.0947/1 r/60.0520/24.5045/1 r/37.0887/-76.4585/100 p/OG/OF3/N');
ok(defined $i_rx, 1, "Failed to initialize Ham::APRS::IS");

View File

@ -19,10 +19,10 @@ ok($p->start(), 1, "Failed to start product");
my $login = "N0CALL-1";
my $server_call = "TESTING";
my $i_tx = new Ham::APRS::IS("localhost:14580", $login);
my $i_tx = new Ham::APRS::IS("localhost:55580", $login);
ok(defined $i_tx, 1, "Failed to initialize Ham::APRS::IS");
my $i_rx = new Ham::APRS::IS("localhost:14581", "N0CALL-2",
my $i_rx = new Ham::APRS::IS("localhost:55581", "N0CALL-2",
'filter' => 'r/-38.5452/-58.7366/1 s/->' # GPRMC
);
ok(defined $i_rx, 1, "Failed to initialize Ham::APRS::IS");