File: test07.pl

package info (click to toggle)
open-isns 0.101-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,440 kB
  • sloc: ansic: 19,981; sh: 3,211; python: 1,083; perl: 839; makefile: 214
file content (37 lines) | stat: -rwxr-xr-x 1,095 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/perl
#
# Copyright (C) 2007 Olaf Kirch <olaf.kirch@oracle.com>
#
# This test case validates that the server discards portals
# that do not respond to ESI messages

push(@INC, ".");
require "harness.pl";

&isns_prep_slow_test("test07", 30, @ARGV);

$server = &create_server({ "ESIMinInterval" => "5s" });
$client = &create_client($server);

&isns_start_server($server);

# 1: Enroll the client
&isns_enroll_client($client) if ($__isns_security);

# 2: Register a simple initiator with one portal
&isns_register_client($client, "initiator portal,esi-port=65535,esi-interval=5");

&isns_stage("expired", "Waiting for ESI to expire (~15 sec)");
&isns_idle(15);
&isns_verify_db($server);

# 3: Register a simple initiator with two portals, one with ESI and one without.
# When the ESI monitored portal expires, this should still take down
# the whole network entity.
&isns_register_client($client, "initiator portal,esi-port=65535,esi-interval=5 portal=127.0.0.1:1");

&isns_stage("expired", "Waiting for ESI to expire (~15 sec)");
&isns_idle(15);
&isns_verify_db($server);

&isns_finish;