Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent3
Commits
cd0d4954
Commit
cd0d4954
authored
May 12, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More comprehensive testing of std.fileread()
parent
7af4ffd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
76 deletions
+55
-76
m00004.vtc
bin/varnishtest/tests/m00004.vtc
+55
-76
No files found.
bin/varnishtest/tests/m00004.vtc
View file @
cd0d4954
...
...
@@ -13,7 +13,9 @@ server s1 {
}
} -start
varnish v1 -arg "-pvmod_dir=${topbuild}/lib/libvmod_std/.libs/" \
varnish v1 \
-arg "-pvmod_dir=${topbuild}/lib/libvmod_std/.libs/" \
-arg "-pthread_pools=1" \
-vcl+backend {
import std;
...
...
@@ -29,86 +31,63 @@ varnish v1 -arg "-pvmod_dir=${topbuild}/lib/libvmod_std/.libs/" \
} -start
client c1 {
loop 5 {
txreq -url "/one"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.http.foo == "bar"
expect resp.http.one == "File One"
}
txreq -url "/one"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.http.foo == "bar"
expect resp.http.one == "File One"
loop 5 {
txreq -url "/two"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.http.foo == "bar"
expect resp.http.two == "File Two"
txreq -url "/three"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.http.foo == "bar"
expect resp.http.three == "File Three"
}
}
txreq -url "/two"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.http.foo == "bar"
expect resp.http.two == "File Two"
client c2 {
loop 5 {
txreq -url "/two"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.http.foo == "bar"
expect resp.http.two == "File Two"
}
txreq -url "/three"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.http.foo == "bar"
expect resp.http.three == "File Three"
} -run
loop 5 {
txreq -url "/one"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.http.foo == "bar"
expect resp.http.one == "File One"
txreq -url "/three"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.http.foo == "bar"
expect resp.http.three == "File Three"
}
}
varnish v1 -vcl+backend {
import std;
client c3
{
loop 5
{
txreq -url "/three"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.http.foo == "bar"
expect resp.http.three == "File Three"
sub vcl_deliver
{
if (req.url == "/one")
{
set resp.http.one = std.fileread("${tmpdir}/m00004_file_one");
} else if (req.url == "/two") {
set resp.http.two = std.fileread("${tmpdir}/m00004_file_two");
} else if (req.url == "/three") {
set resp.http.three = std.fileread("${tmpdir}/m00004_file_three");
}
}
}
loop 5 {
txreq -url "/two"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.http.foo == "bar"
expect resp.http.two == "File Two"
txreq -url "/one"
rxresp
expect resp.status == 200
expect resp.http.content-length == "4"
expect resp.http.foo == "bar"
expect resp.http.one == "File One"
}
}
varnish v1 -cli "vcl.list"
varnish v1 -cli "vcl.use vcl2"
client c1 -run
client c2 -run
client c3 -run
varnish v1 -cli "vcl.list"
varnish v1 -cli "vcl.discard vcl1"
varnish v1 -vcl+backend { }
varnish v1 -cli "vcl.list"
varnish v1 -cli "vcl.discard vcl2"
client c1 {
txreq -url "/one"
rxresp
txreq -url "/two"
rxresp
txreq -url "/three"
rxresp
} -run
varnish v1 -cli "vcl.list"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment