Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
82158a0c
Commit
82158a0c
authored
Oct 21, 2014
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move vmod director tests to the d* space
parent
f5845973
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
104 additions
and
77 deletions
+104
-77
README
bin/varnishtest/tests/README
+2
-1
d00000.vtc
bin/varnishtest/tests/d00000.vtc
+3
-4
d00001.vtc
bin/varnishtest/tests/d00001.vtc
+1
-0
d00002.vtc
bin/varnishtest/tests/d00002.vtc
+1
-0
d00003.vtc
bin/varnishtest/tests/d00003.vtc
+3
-4
d00004.vtc
bin/varnishtest/tests/d00004.vtc
+4
-0
d00005.vtc
bin/varnishtest/tests/d00005.vtc
+90
-0
v00009.vtc
bin/varnishtest/tests/v00009.vtc
+0
-68
No files found.
bin/varnishtest/tests/README
View file @
82158a0c
...
...
@@ -16,10 +16,11 @@ Naming scheme
id ~ [a] --> varnishtest(1) tests
id ~ [b] --> Basic functionality tests
id ~ [c] --> Complex functionality tests
id ~ [d] --> Director VMOD tests
id ~ [e] --> ESI tests
id ~ [g] --> GZIP tests
id ~ [l] --> VSL tests
id ~ [m] --> VMOD tests
id ~ [m] --> VMOD tests
excluding director
id ~ [p] --> Persistent tests
id ~ [r] --> Regression tests, same number as ticket
id ~ [s] --> Slow tests, expiry, grace etc.
...
...
bin/varnishtest/tests/
m00009
.vtc
→
bin/varnishtest/tests/
d00000
.vtc
View file @
82158a0c
varnishtest "Test vmod.directors round robin director"
varnishtest "Test round robin director"
server s1 {
rxreq
...
...
@@ -22,10 +21,9 @@ server s4 {
txresp -body "4444"
} -start
varnish v1 -vcl+backend {
import ${vmod_directors};
sub vcl_init {
new rr = directors.round_robin();
rr.add_backend(s1);
...
...
@@ -37,6 +35,7 @@ varnish v1 -vcl+backend {
sub vcl_backend_fetch {
set bereq.backend = rr.backend();
}
sub vcl_backend_response {
set beresp.http.where = bereq.backend + "-->" + beresp.backend;
}
...
...
bin/varnishtest/tests/
v00036
.vtc
→
bin/varnishtest/tests/
d00001
.vtc
View file @
82158a0c
...
...
@@ -28,6 +28,7 @@ varnish v1 -vcl+backend {
sub vcl_recv {
return (pass);
}
sub vcl_backend_fetch {
set bereq.backend = fb1.backend();
}
...
...
bin/varnishtest/tests/
v00007
.vtc
→
bin/varnishtest/tests/
d00002
.vtc
View file @
82158a0c
...
...
@@ -19,6 +19,7 @@ varnish v1 -vcl+backend {
sub vcl_backend_fetch {
set bereq.backend = foo.backend();
}
sub vcl_backend_response {
set beresp.http.where = bereq.backend + "-->" + beresp.backend;
}
...
...
bin/varnishtest/tests/
v00026
.vtc
→
bin/varnishtest/tests/
d00003
.vtc
View file @
82158a0c
varnishtest "
H
ash director"
varnishtest "
Test h
ash director"
server s1 {
rxreq
...
...
@@ -18,7 +18,6 @@ server s2 {
txresp -hdr "Foo: 8" -body "8"
} -start
varnish v1 -vcl+backend {
import ${vmod_directors};
...
...
@@ -31,6 +30,7 @@ varnish v1 -vcl+backend {
sub vcl_recv {
return(pass);
}
sub vcl_backend_fetch {
if (bereq.url == "/nohdr") {
set bereq.backend = h1.backend(bereq.http.Void);
...
...
@@ -42,6 +42,7 @@ varnish v1 -vcl+backend {
set bereq.backend = h1.backend(bereq.url);
}
}
sub vcl_backend_response {
set beresp.http.where = bereq.backend + "-->" + beresp.backend;
}
...
...
@@ -73,6 +74,4 @@ client c1 {
txreq -url /nohdr
rxresp
expect resp.http.foo == "8"
} -run
bin/varnishtest/tests/
v00022
.vtc
→
bin/varnishtest/tests/
d00004
.vtc
View file @
82158a0c
...
...
@@ -6,6 +6,7 @@ server s1 {
rxreq
txresp -body "1"
} -start
server s2 {
rxreq
txresp -body "22"
...
...
@@ -16,10 +17,12 @@ server s2 {
rxreq
txresp -body "22"
} -start
server s3 {
rxreq
txresp -body "333"
} -start
server s4 {
rxreq
txresp -body "4444"
...
...
@@ -45,6 +48,7 @@ varnish v1 -vcl+backend {
sub vcl_recv {
return(pass);
}
sub vcl_backend_fetch {
set bereq.backend = foo.backend();
}
...
...
bin/varnishtest/tests/d00005.vtc
0 → 100644
View file @
82158a0c
varnishtest "Test round robin stacked within fallback"
server s1 -repeat 2 {
rxreq
txresp -body "1"
} -start
server s2 -repeat 4 {
rxreq
txresp -body "22"
} -start
server s3 -repeat 2 {
rxreq
txresp -body "333"
} -start
server s4 -repeat 2 {
rxreq
txresp -body "4444"
} -start
varnish v1 -vcl+backend {
import ${vmod_directors};
sub vcl_init {
new rr1 = directors.round_robin();
rr1.add_backend(s1);
rr1.add_backend(s2);
new rr2 = directors.round_robin();
rr2.add_backend(s3);
rr2.add_backend(s4);
new fb = directors.fallback();
fb.add_backend(rr1.backend());
fb.add_backend(rr2.backend());
}
sub vcl_recv {
return (pass);
}
sub vcl_backend_fetch {
set bereq.backend = fb.backend();
}
} -start
client c1 {
txreq
rxresp
expect resp.body == "1"
txreq
rxresp
expect resp.body == "22"
txreq
rxresp
expect resp.body == "1"
txreq
rxresp
expect resp.body == "22"
} -run
varnish v1 -cliok "backend.set_health s1 sick"
client c1 {
txreq
rxresp
expect resp.body == "22"
txreq
rxresp
expect resp.body == "22"
} -run
varnish v1 -cliok "backend.set_health s2 sick"
client c1 {
txreq
rxresp
expect resp.body == "333"
txreq
rxresp
expect resp.body == "4444"
txreq
rxresp
expect resp.body == "333"
txreq
rxresp
expect resp.body == "4444"
} -run
bin/varnishtest/tests/v00009.vtc
deleted
100644 → 0
View file @
f5845973
varnishtest "Test round robin director"
server s1 {
rxreq
txresp -body "1"
} -start
server s2 {
rxreq
txresp -body "22"
} -start
server s3 {
rxreq
txresp -body "333"
} -start
server s4 {
rxreq
txresp -body "4444"
} -start
varnish v1 -vcl+backend {
import ${vmod_directors};
sub vcl_init {
new batman = directors.round_robin();
batman.add_backend(s1);
batman.add_backend(s2);
batman.add_backend(s3);
batman.add_backend(s4);
}
sub vcl_backend_fetch {
set bereq.backend = batman.backend();
}
} -start
client c1 {
timeout 3
txreq -url "/foo1"
rxresp
expect resp.bodylen == 1
txreq -url "/foo2"
rxresp
expect resp.bodylen == 2
txreq -url "/foo3"
rxresp
expect resp.bodylen == 3
txreq -url "/foo4"
rxresp
expect resp.bodylen == 4
} -run
server s1 -start
server s2 -start
client c2 {
timeout 3
txreq -url "/foo11"
rxresp
expect resp.bodylen == 1
txreq -url "/foo22"
rxresp
expect resp.bodylen == 2
} -run
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