summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2018-12-18 00:08:46 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2018-12-18 00:08:46 -0500
commita1077d18cb36b0cbdfb9da7138ba302f2090db78 (patch)
treede4251da2737b07b88c27e44203a3f1878896167 /tests
parentfe3dc1796894d22ad60da24d2bfc25fbf612861c (diff)
downloadlighttpd-git-a1077d18cb36b0cbdfb9da7138ba302f2090db78.tar.gz
[tests] more test config cleanup
Diffstat (limited to 'tests')
-rw-r--r--tests/fastcgi-10.conf26
-rw-r--r--tests/lowercase.conf32
-rwxr-xr-xtests/mod-fastcgi.t19
-rwxr-xr-xtests/mod-proxy.t2
-rw-r--r--tests/proxy.conf11
5 files changed, 6 insertions, 84 deletions
diff --git a/tests/fastcgi-10.conf b/tests/fastcgi-10.conf
index 7c1ba539..df5a7880 100644
--- a/tests/fastcgi-10.conf
+++ b/tests/fastcgi-10.conf
@@ -24,40 +24,23 @@ server.indexfiles = (
accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
-$HTTP["host"] == "bin-env.example.org" {
-
-fastcgi.server = (
- ".php" => (
- "grisu" => (
- "host" => "127.0.0.1",
- "port" => 1048,
- "bin-path" => env.PHP,
- "bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
- ),
- ),
-)
-
-}
-else {
-
fastcgi.debug = 0
fastcgi.server = (
".php" => ( (
"host" => "127.0.0.1",
"port" => 1026,
- "broken-scriptfilename" => "enable",
+ "bin-path" => env.PHP,
+ "bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
"allow-x-send-file" => "enable",
) ),
"/prefix.fcgi" => ( (
"host" => "127.0.0.1",
"port" => 1026,
- "check-local" => "disable",
- "broken-scriptfilename" => "enable",
+ "bin-path" => env.PHP,
+ "bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
) ),
)
-}
-
server.error-handler-404 = "/indexfile/return-404.php"
$HTTP["host"] == "zzz.example.org" {
@@ -65,7 +48,6 @@ $HTTP["host"] == "zzz.example.org" {
}
$HTTP["host"] == "auth.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "auth.example.org"
auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd"
auth.backend = "htpasswd"
diff --git a/tests/lowercase.conf b/tests/lowercase.conf
index 39215ba4..b8f2ec7d 100644
--- a/tests/lowercase.conf
+++ b/tests/lowercase.conf
@@ -11,50 +11,18 @@ server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.
server.force-lowercase-filenames = "enable"
server.modules = (
- "mod_setenv",
- "mod_secdownload",
"mod_access",
"mod_auth",
"mod_authn_file",
- "mod_status",
- "mod_expire",
- "mod_cgi",
-)
-
-server.indexfiles = (
- "index.html",
- "index.htm",
- "default.htm",
)
mimetype.assign = (
- ".png" => "image/png",
".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".gif" => "image/gif",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".pdf" => "application/pdf",
- ".swf" => "application/x-shockwave-flash",
- ".spl" => "application/futuresplash",
- ".txt" => "text/plain",
- ".tar.gz" => "application/x-tgz",
- ".tgz" => "application/x-tgz",
- ".gz" => "application/x-gzip",
- ".c" => "text/plain",
- ".conf" => "text/plain",
-)
-
-cgi.assign = (
- ".pl" => env.PERL,
- ".cgi" => env.PERL,
)
auth.backend = "plain"
auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
-auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd"
-
$HTTP["host"] == "lowercase-auth" {
auth.require = (
"/image.jpg" => (
diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t
index a03360bb..7a00963c 100755
--- a/tests/mod-fastcgi.t
+++ b/tests/mod-fastcgi.t
@@ -7,22 +7,15 @@ BEGIN {
}
use strict;
-use Test::More tests => 48;
+use Test::More tests => 46;
use LightyTest;
my $tf = LightyTest->new();
my $t;
-my $php_child = -1;
SKIP: {
- skip "PHP already running on port 1026", 1 if $tf->listening_on(1026);
- skip "no php binary found", 1 unless $LightyTest::HAVE_PHP;
- ok(-1 != ($php_child = $tf->spawnfcgi($ENV{'PHP'}, 1026)), "Spawning php");
-}
-
-SKIP: {
- skip "no PHP running on port 1026", 31 unless $tf->listening_on(1026);
+ skip "no php binary found", 31 unless $LightyTest::HAVE_PHP;
$tf->{CONFIGFILE} = 'fastcgi-10.conf';
ok($tf->start_proc == 0, "Starting lighttpd") or goto cleanup;
@@ -262,12 +255,6 @@ EOF
}
SKIP: {
- skip "PHP not started, cannot stop it", 1 unless $php_child != -1;
- ok(0 == $tf->endspawnfcgi($php_child), "Stopping php");
- $php_child = -1;
-}
-
-SKIP: {
skip "no fcgi-auth, fcgi-responder found", 15
unless (-x $tf->{BASEDIR}."/tests/fcgi-auth" || -x $tf->{BASEDIR}."/tests/fcgi-auth.exe")
&& (-x $tf->{BASEDIR}."/tests/fcgi-responder" || -x $tf->{BASEDIR}."/tests/fcgi-responder.exe");
@@ -392,6 +379,4 @@ exit 0;
cleanup: ;
-$tf->endspawnfcgi($php_child) if $php_child != -1;
-
die();
diff --git a/tests/mod-proxy.t b/tests/mod-proxy.t
index cfc211c6..d3c18214 100755
--- a/tests/mod-proxy.t
+++ b/tests/mod-proxy.t
@@ -15,7 +15,6 @@ my $tf_real = LightyTest->new();
my $tf_proxy = LightyTest->new();
my $t;
-my $php_child = -1;
## we need two procs
## 1. the real webserver
@@ -63,7 +62,6 @@ exit 0;
cleanup:
-$tf_real->endspawnfcgi($php_child) if $php_child != -1;
$tf_real->stop_proc;
$tf_proxy->stop_proc;
diff --git a/tests/proxy.conf b/tests/proxy.conf
index 0ca8ec78..38ab6e94 100644
--- a/tests/proxy.conf
+++ b/tests/proxy.conf
@@ -12,23 +12,12 @@ server.tag = "Proxy"
server.modules = (
"mod_rewrite",
- "mod_setenv",
"mod_proxy",
"mod_accesslog",
)
accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
-setenv.add-environment = (
- "TRAC_ENV" => "foo",
-)
-setenv.add-request-header = (
- "FOO" => "foo",
-)
-setenv.add-response-header = (
- "BAR" => "foo",
-)
-
proxy.debug = 1
proxy.server = ( "" => (
"grisu" => (