mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-22 17:16:06 +00:00
Allow NOAUTH to test that people really do need to log in. A regression
test identifying that.
This commit is contained in:
parent
203351337c
commit
bc1065c637
@ -8,10 +8,11 @@ my $test=$ARGV[1];
|
||||
|
||||
usage() unless ( defined($suite) && defined($test) );
|
||||
|
||||
my @arguments = ( "--basic", "--user", "user1:user1", "--proxy", "", "--silent" );
|
||||
my @arguments = ( "--basic", "--proxy", "", "--silent" );
|
||||
push @arguments, "--verbose" if ( defined($ARGV[2]) );
|
||||
|
||||
my $url;
|
||||
my @auth = ( "--user", "user1:user1" );
|
||||
|
||||
my $datafile = "tests/$suite/$test.data";
|
||||
|
||||
@ -23,6 +24,14 @@ while( <TEST> ) {
|
||||
push @arguments, "--include";
|
||||
};
|
||||
|
||||
/^\s*NOAUTH\s*(#|$|=)/ && do {
|
||||
@auth = ();
|
||||
};
|
||||
|
||||
/^\s*AUTH\s*=\s*(\S.*)$/ && do {
|
||||
@auth = ( "--user", $1 );
|
||||
};
|
||||
|
||||
/^\s*DATA\s*=\s*(\S.*)$/ && do {
|
||||
$datafile="tests/$suite/$1.data";
|
||||
};
|
||||
@ -55,6 +64,8 @@ EOERROR
|
||||
exit (2);
|
||||
}
|
||||
|
||||
push @arguments, @auth;
|
||||
|
||||
if ( -f $datafile ) {
|
||||
push @arguments, "--data-binary", "\@$datafile";
|
||||
# print "Using datafile: ", $datafile,"\n";
|
||||
|
||||
8
testing/tests/regression-suite/100-Evo-OPTIONS-1.result
Normal file
8
testing/tests/regression-suite/100-Evo-OPTIONS-1.result
Normal file
@ -0,0 +1,8 @@
|
||||
HTTP/1.1 401 Unauthorized
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
Server: Apache/2.2.3 (Debian) DAV/2
|
||||
WWW-Authenticate: Basic realm="Really Simple CalDAV Store"
|
||||
Content-Length: 40
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
|
||||
Please log in for access to this system.
|
||||
Loading…
x
Reference in New Issue
Block a user