Improve unit test (#1704)
This commit is contained in:
parent
74a3b4a242
commit
41c40cec02
|
@ -12,7 +12,7 @@ BEGIN {
|
|||
require 't/saml-lib.pm';
|
||||
}
|
||||
|
||||
my $maintests = 23;
|
||||
my $maintests = 24;
|
||||
my $debug = 'error';
|
||||
my %handlerOR = ( issuer => [], sp => [] );
|
||||
|
||||
|
@ -67,9 +67,11 @@ SKIP: {
|
|||
|
||||
# IDP must be sorted
|
||||
my @idp = map /val="http:\/\/(.+?)\/saml\/metadata">/g, $res->[2]->[0];
|
||||
ok( $idp[0] eq 'auth.idp2.com', ) or print STDERR Dumper( \@idp );
|
||||
ok( $idp[1] eq 'auth.idp3.com', ) or print STDERR Dumper( \@idp );
|
||||
ok( $idp[2] eq 'auth.idp.com', ) or print STDERR Dumper( \@idp );
|
||||
ok( $idp[0] eq 'auth.idp2.com', '1st = idp2' ) or print STDERR Dumper( \@idp );
|
||||
ok( $idp[1] eq 'auth.z_idp2.com', '2nd = z_idp2' ) or print STDERR Dumper( \@idp );
|
||||
ok( $idp[2] eq 'auth.idp3.com', '3rd = idp3' ) or print STDERR Dumper( \@idp );
|
||||
ok( $idp[3] eq 'auth.idp.com', '4th= idp' ) or print STDERR Dumper( \@idp );
|
||||
|
||||
ok(
|
||||
$res->[2]->[0] =~
|
||||
m%<img src="http://auth.sp.com/static/common/icons/sfa_manager.png" class="mr-2" alt="IDP2" title="IDP2" />%,
|
||||
|
@ -259,6 +261,11 @@ sub sp {
|
|||
uid => "1;uid",
|
||||
cn => "0;cn"
|
||||
},
|
||||
z_idp2 => {
|
||||
mail => "0;mail;;",
|
||||
uid => "1;uid",
|
||||
cn => "0;cn"
|
||||
},
|
||||
},
|
||||
samlIDPMetaDataOptions => {
|
||||
idp => {
|
||||
|
@ -298,6 +305,16 @@ sub sp {
|
|||
samlIDPMetaDataOptionsSortNumber => 1,
|
||||
samlIDPMetaDataOptionsDisplayName => 'Test_Sort',
|
||||
},
|
||||
z_idp2 => {
|
||||
samlIDPMetaDataOptionsEncryptionMode => 'none',
|
||||
samlIDPMetaDataOptionsSSOBinding => 'post',
|
||||
samlIDPMetaDataOptionsSLOBinding => 'post',
|
||||
samlIDPMetaDataOptionsSignSSOMessage => 1,
|
||||
samlIDPMetaDataOptionsSignSLOMessage => 1,
|
||||
samlIDPMetaDataOptionsCheckSSOMessageSignature => 1,
|
||||
samlIDPMetaDataOptionsCheckSLOMessageSignature => 1,
|
||||
samlIDPMetaDataOptionsForceUTF8 => 1,
|
||||
},
|
||||
},
|
||||
samlIDPMetaDataExportedAttributes => {
|
||||
idp => {
|
||||
|
@ -312,6 +329,10 @@ sub sp {
|
|||
"uid" => "0;uid;;",
|
||||
"cn" => "1;cn;;",
|
||||
},
|
||||
z_idp2 => {
|
||||
"uid" => "0;uid;;",
|
||||
"cn" => "1;cn;;",
|
||||
},
|
||||
},
|
||||
samlIDPMetaDataXML => {
|
||||
idp => {
|
||||
|
@ -326,6 +347,10 @@ sub sp {
|
|||
samlIDPMetaDataXML =>
|
||||
samlIDPMetaDataXML( 'idp3', 'HTTP-POST' )
|
||||
},
|
||||
z_idp2 => {
|
||||
samlIDPMetaDataXML =>
|
||||
samlIDPMetaDataXML( 'z_idp2', 'HTTP-POST' )
|
||||
},
|
||||
},
|
||||
samlOrganizationDisplayName => "SP",
|
||||
samlOrganizationName => "SP",
|
||||
|
|
Loading…
Reference in New Issue
Block a user