summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2018-12-02 03:25:20 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2018-12-03 23:03:04 -0500
commitb2a62398513499cf52e80c615d38ad951cb52f03 (patch)
tree1beb29e5f06256813a93058e8e868ac576edc43a /tests
parent685f4ed62c45aac8196166cf8b5f32f5a8416cb5 (diff)
downloadlighttpd1.4-b2a62398513499cf52e80c615d38ad951cb52f03.tar.gz
lighttpd1.4-b2a62398513499cf52e80c615d38ad951cb52f03.zip
[mod_simple_vhost] t/test_mod_simple_vhost
create t/test_mod_simple_vhost to test mod_simple_vhost basic logic remove tests/mod-simplevhost.t, which was not testing mod_simple_vhost
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt1
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/meson.build1
-rw-r--r--tests/mod-simplevhost.conf30
-rwxr-xr-xtests/mod-simplevhost.t37
-rwxr-xr-xtests/prepare.sh2
6 files changed, 0 insertions, 73 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 98cfb954..f033e562 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -32,7 +32,6 @@ set(T_FILES
mod-rewrite.t
mod-secdownload.t
mod-setenv.t
- mod-simplevhost.t
mod-ssi.t
mod-userdir.t
request.t
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 398c67c3..7f1f1663 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -52,8 +52,6 @@ CONFS=\
mod-rewrite.t \
mod-secdownload.t \
mod-setenv.t \
- mod-simplevhost.conf \
- mod-simplevhost.t \
mod-ssi.t \
mod-userdir.t \
proxy.conf \
diff --git a/tests/meson.build b/tests/meson.build
index 1ed3624e..4927f795 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -41,7 +41,6 @@ tests = [
'mod-rewrite.t',
'mod-secdownload.t',
'mod-setenv.t',
- 'mod-simplevhost.t',
'mod-ssi.t',
'mod-userdir.t',
'request.t',
diff --git a/tests/mod-simplevhost.conf b/tests/mod-simplevhost.conf
deleted file mode 100644
index 533fe3b9..00000000
--- a/tests/mod-simplevhost.conf
+++ /dev/null
@@ -1,30 +0,0 @@
-debug.log-request-handling = "enable"
-debug.log-response-header = "disable"
-debug.log-request-header = "disable"
-
-## bind to localhost (default: all interfaces)
-server.bind = "localhost"
-server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
-server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log"
-server.name = "www.example.org"
-
-server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
-server.pid-file = env.SRCDIR + "/tmp/lighttpd/lighttpd.pid"
-
-## bind to port (default: 80)
-server.port = 2048
-
-
-
-######################## MODULE CONFIG ############################
-
-server.modules = (
- "mod_simple_vhost",
-)
-
-# docroot depending on request path
-$HTTP["url"] =~ "^/a/" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/a.example.org/pages/"
-} else $HTTP["url"] =~ "^/b/" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/b.example.org/pages/"
-}
diff --git a/tests/mod-simplevhost.t b/tests/mod-simplevhost.t
deleted file mode 100755
index 1ff69975..00000000
--- a/tests/mod-simplevhost.t
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env perl
-BEGIN {
- # add current source dir to the include-path
- # we need this for make distcheck
- (my $srcdir = $0) =~ s,/[^/]+$,/,;
- unshift @INC, $srcdir;
-}
-
-use strict;
-use IO::Socket;
-use Test::More tests => 4;
-use LightyTest;
-
-my $tf = LightyTest->new();
-my $t;
-
-$tf->{CONFIGFILE} = 'mod-simplevhost.conf';
-
-ok($tf->start_proc == 0, "Starting lighttpd") or die();
-
-$t->{REQUEST} = ( <<EOF
-GET /a/a.html HTTP/1.0
-Host: www.example.org
-EOF
- );
-$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
-ok($tf->handle_http($t) == 0, 'Check /a/a.html path');
-
-$t->{REQUEST} = ( <<EOF
-GET /b/b.html HTTP/1.0
-Host: www.example.org
-EOF
- );
-$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
-ok($tf->handle_http($t) == 0, 'Check /b/b.html path');
-
-ok($tf->stop_proc == 0, "Stopping lighttpd");
diff --git a/tests/prepare.sh b/tests/prepare.sh
index 306d1ce6..f4f11ef8 100755
--- a/tests/prepare.sh
+++ b/tests/prepare.sh
@@ -53,8 +53,6 @@ touch "${tmpdir}/servers/www.example.org/pages/image.jpg" \
"${tmpdir}/servers/www.example.org/pages/Foo.txt" \
"${tmpdir}/servers/www.example.org/pages/a" \
"${tmpdir}/servers/www.example.org/pages/index.html~" \
- "${tmpdir}/servers/a.example.org/pages/a/a.html" \
- "${tmpdir}/servers/b.example.org/pages/b/b.html" \
"${tmpdir}/servers/evhost/e/v/evhost1/pages/index.html" \
"${tmpdir}/servers/evhost/evhost2/pages/index.html"
echo "12345" > "${tmpdir}/servers/www.example.org/pages/range.pdf"