From: Sapan Bhatia Date: Wed, 30 Jul 2008 19:27:32 +0000 (+0000) Subject: update vsys test X-Git-Tag: tests-4.3-0~130 X-Git-Url: http://git.onelab.eu/?p=tests.git;a=commitdiff_plain;h=396044e4bcb71f8648153a50d783cece1542d8d3 update vsys test --- diff --git a/qaapi/qa/tests/node/vsys_launch.pl b/qaapi/qa/tests/node/vsys_launch.pl index 40317c0..76bfc86 100644 --- a/qaapi/qa/tests/node/vsys_launch.pl +++ b/qaapi/qa/tests/node/vsys_launch.pl @@ -1,11 +1,17 @@ #!/usr/bin/perl +use strict; -# Subtest #1 Create new vsys entry +my $prefix="pl"; +# my $prefix="ple"; + +my $slice="$prefix"."_netflow"; +my $slicedir="/vservers/$slice"; +# Subtest #1 Create new vsys entry print "Creating entries...\t"; -$vsys_entry="#!/bin/bash\n\ncat /etc/passwd"; -$vsys_entry_acl = "/vservers/pl_netflow pl_netflow"; +my $vsys_entry="#!/bin/bash\n\ncat /etc/passwd"; +my $vsys_entry_acl = "$slice"; open ACL,">/vsys/test.acl" || die ("Could not create acl for test entry."); print ACL $vsys_entry_acl; @@ -23,21 +29,21 @@ chmod 0755,"/vsys/test"; (-f "/vservers/pl_netflow/test.out") || die ("out file didn't show up in the slice"); # OK, SUBTEST #1 SUCCEEDED -print "(success)\n"; +print "[SUCCESS] The new entried appeared OK\n"; # Subtest #2 print "Multiple-connection test...\t"; system("su -c support/vsys_conctest pl_netflow -"); -($? && die ("Multiple-connection test failed\n")); +($? && die ("[FAILED] Multiple-connection test failed\n")); # OK, SUBTEST #2 SUCCEEDED -print "(success)\n"; +print "[SUCCESS])\n"; # Subtest #3 unlink "/vsys/test.acl"; unlink "/vsys/test"; -(-f "/vservers/pl_netflow/test.in" || -f "/vservers/pl_netflow/test.out") && die ("cleanup failed"); +(-f "$slicedir/test.in" || -f "$slicedir/test.out") && die ("cleanup failed");