⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myproxy-test-replicate

📁 代理服务器源代码 供大家学习使用,希望大家喜欢
💻
📖 第 1 页 / 共 3 页
字号:
#### Test 5##($exitstatus, $output) =    &runtest("myproxy-get-delegation -s localhost -p $s1port -t 1 -o /tmp/myproxy-test.$$ -v -S",	     $passphrase . "\n");print "MyProxy Test 5 (retrieve stored credential from slave): ";if ($exitstatus == 0) {    ($exitstatus, $output) =	&verifyproxy("/tmp/myproxy-test.$$");}if ($exitstatus == 0) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 6##$old_passphrase = $passphrase;$passphrase = sprintf "%010.d", int(rand(0x7fffffff));($exitstatus, $output) =    &runtest("myproxy-change-pass-phrase -s localhost -p $mport -v -S",	     "$old_passphrase\n$passphrase\n");print "MyProxy Test 6 (change passphrase for credential): ";if ($exitstatus == 0 && $output =~ /Pass phrase changed/) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 7##($exitstatus, $output) =    &runtest("myproxy-get-delegation -s localhost -p $mport -t 1 -o /tmp/myproxy-test.$$ -v -S",	     $passphrase . "\n");print "MyProxy Test 7 (verify new passphrase): ";if ($exitstatus == 0) {    ($exitstatus, $output) =	&verifyproxy("/tmp/myproxy-test.$$");}if ($exitstatus == 0) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 8##($exitstatus, $output) =    &runtest("myproxy-replicate -c /tmp/myproxy-test.serverconf.$mport.master.$$ -r /tmp/myproxy-test.serverdir.$mport.master.$$",	     undef);print "MyProxy Test 8 (Replicate master server to all slaves): ";if ($exitstatus == 0) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 9##($exitstatus, $output) =    &runtest("myproxy-get-delegation -s localhost -p $s2port -t 1 -o /tmp/myproxy-test.$$ -v -S",	     $passphrase . "\n");print "MyProxy Test 9 (verify new passphrase has been replicated to slaves): ";if ($exitstatus == 0) {    ($exitstatus, $output) =	&verifyproxy("/tmp/myproxy-test.$$");}if ($exitstatus == 0) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 10##($exitstatus, $output) =    &runtest("myproxy-get-delegation -s localhost -p $s3port -a \$X509_USER_PROXY -t 1 -o /tmp/myproxy-test.$$ -v", undef);print "MyProxy Test 10 (verify default renewal policy on slave): ";if ($exitstatus != 0) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 11##($exitstatus, $output) =    &runtest("myproxy-destroy -s localhost -p $mport -v", undef);print "MyProxy Test 11 (remove credential from master repository): ";if ($exitstatus == 0 && $output =~ /was successfully removed/) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 12##($exitstatus, $output) =    &runtest("myproxy-info -v", undef);print "MyProxy Test 12 (verify credentials are removed from master): ";if (!($output =~ /default credential/)) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 13##($exitstatus, $output) =    &runtest("myproxy-replicate -c /tmp/myproxy-test.serverconf.$mport.master.$$ -r /tmp/myproxy-test.serverdir.$mport.master.$$",	     undef);print "MyProxy Test 13 (Replicate destroy to all slaves): ";if ($exitstatus == 0) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 14##($exitstatus, $output) =    &runtest("myproxy-get-delegation -s localhost -p $s2port -t 1 -o /tmp/myproxy-test.$$ -v -S",	     $passphrase . "\n");print "MyProxy Test 14 (verify destroy has been replicated to slaves): ";if ($exitstatus != 0 && $output =~ /Credentials do not exist/) {    ($exitstatus, $output) =	&verifyproxy("/tmp/myproxy-test.$$");}if ($exitstatus == 0) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 15##($exitstatus, $output) =    &runtest("myproxy-init -s localhost -p $mport -v -R 'nobody' -k 'nobody' -c 1 -t 1 -d -S",	     $passphrase . "\n");print "MyProxy Test 15 (store credentials with renewal policies): ";if ($exitstatus == 0) {    ($exitstatus, $output) =	&runtest("myproxy-init -s localhost -p $mport -v -x -R '$cert_subject' -k 'mine' -c 1 -t 1 -d -S",		 $passphrase . "\n");}if ($exitstatus == 0) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 16##($exitstatus, $output) = &runtest("myproxy-info -s localhost -p $mport -v -d", undef);print "MyProxy Test 16 (get info for stored renewal credentials): ";if ($exitstatus == 0 && $output =~ /username/) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 17##($exitstatus, $output) =    &runtest("myproxy-get-delegation -s localhost -p $mport -k 'mine' -a $ENV{'X509_USER_PROXY'} -t 1 -o /tmp/myproxy-test.$$ -v -d",	     undef);print "MyProxy Test 17 (verify renewal policies): ";if ($exitstatus == 0) {    ($exitstatus, $output) =	&verifyproxy("/tmp/myproxy-test.$$");}if ($exitstatus == 0) {    ($exitstatus, $output) =	&runtest("myproxy-get-delegation -s localhost -p $mport -k 'nobody' -a $ENV{'X509_USER_PROXY'} -t 1 -o /tmp/myproxy-test.$$ -v -d",		 undef);    if ($exitstatus != 0) {	print "SUCCEEDED\n"; $SUCCESSES++;    } else {	print "FAILED\n"; $FAILURES++;	print STDERR "Shouldn't have allowed retrieval.\n";	print STDERR $output;    }} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 18##($exitstatus, $output) =    &runtest("myproxy-replicate -c /tmp/myproxy-test.serverconf.$mport.master.$$ -r /tmp/myproxy-test.serverdir.$mport.master.$$",             undef);print "MyProxy Test 18 (Replicate to all slaves): ";if ($exitstatus == 0) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 19##($exitstatus, $output) =    &runtest("myproxy-get-delegation -s localhost -p $s1port -k 'mine' -a $ENV{'X509_USER_PROXY'} -t 1 -o /tmp/myproxy-test.$$ -v -d",	     undef);print "MyProxy Test 19 (verify renewal policies on slave): ";if ($exitstatus == 0) {    ($exitstatus, $output) =	&verifyproxy("/tmp/myproxy-test.$$");}if ($exitstatus == 0) {    ($exitstatus, $output) =	&runtest("myproxy-get-delegation -s localhost -p $s1port -k 'nobody' -a $ENV{'X509_USER_PROXY'} -t 1 -o /tmp/myproxy-test.$$ -v -d",		 undef);    if ($exitstatus != 0) {	print "SUCCEEDED\n"; $SUCCESSES++;    } else {	print "FAILED\n"; $FAILURES++;	print STDERR "Shouldn't have allowed retrieval.\n";	print STDERR $output;    }} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}&runtest("myproxy-destroy -s localhost -p $mport -v -k 'mine' -d", undef);&runtest("myproxy-destroy -s localhost -p $mport -v -k 'nobody' -d", undef);&runtest("myproxy-replicate -c /tmp/myproxy-test.serverconf.$mport.master.$$ -r /tmp/myproxy-test.serverdir.$mport.master.$$", undef);#### Test replication failure handling###### Test 20##($exitstatus, $output) =    &runtest("myproxy-init -s localhost -p $mport -v -a -c 1 -t 1 -S",	     $passphrase . "\n");print "MyProxy Test 20 (store credential with default name): ";if ($exitstatus == 0) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 21##kill('TERM', $sl3pid) if (defined($sl3pid));($exitstatus, $output) =    &runtest("myproxy-replicate -v -c /tmp/myproxy-test.serverconf.$mport.master.$$ -r /tmp/myproxy-test.serverdir.$mport.master.$$",	     undef);print "MyProxy Test 21 (Replicate master server to all slaves): ";if ($exitstatus != 0 && $output =~ /Unable to connect to/) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 22##start_sl3();($exitstatus, $output) =    &runtest("myproxy-replicate -c /tmp/myproxy-test.serverconf.$mport.master.$$ -r /tmp/myproxy-test.serverdir.$mport.master.$$",	     undef);print "MyProxy Test 22 (Replicate master server to all slaves): ";if ($exitstatus == 0) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 23##kill('TERM', $sl3pid) if (defined($sl3pid));($exitstatus, $output) =    &runtest("myproxy-destroy -s localhost -p $mport -v", undef);print "MyProxy Test 23 (remove credential from master repository): ";if ($exitstatus == 0 && $output =~ /was successfully removed/) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}($exitstatus, $output) =    &runtest("myproxy-replicate -v -c /tmp/myproxy-test.serverconf.$mport.master.$$ -r /tmp/myproxy-test.serverdir.$mport.master.$$",	     undef);print "\t(Replicate master server to all slaves): ";if ($exitstatus != 0 && $output =~ /Unable to connect to/) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 24##start_sl3();($exitstatus, $output) =    &runtest("myproxy-replicate -v -c /tmp/myproxy-test.serverconf.$mport.master.$$ -r /tmp/myproxy-test.serverdir.$mport.master.$$",	     undef);print "MyProxy Test 24 (Replicate master server to all slaves): ";if ($exitstatus == 0) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}#### Test 25##kill('TERM', $sl3pid) if (defined($sl3pid));($exitstatus, $output) =    &runtest("myproxy-init -s localhost -p $mport -v -a -c 1 -t 1 -S",	     $passphrase . "\n");print "MyProxy Test 25 (store credential with default name): ";if ($exitstatus == 0) {    print "SUCCEEDED\n"; $SUCCESSES++;} else {    print "FAILED\n"; $FAILURES++; print STDERR $output;}($exitstatus, $output) =    &runtest("myproxy-replicate -v -c /tmp/myproxy-test.serverconf.$mport.master.$$ -r /tmp/myproxy-test.serverdir.$mport.master.$$",	     undef);print "\t(Replicate master server to all slaves): ";

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -