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
1d75f29c
Unverified
Commit
1d75f29c
authored
Jun 10, 2020
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test polish suggested by Dridi, thank you
parent
9598face
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
50 deletions
+58
-50
d00015.vtc
bin/varnishtest/tests/d00015.vtc
+18
-14
d00016.vtc
bin/varnishtest/tests/d00016.vtc
+16
-12
d00017.vtc
bin/varnishtest/tests/d00017.vtc
+4
-4
d00018.vtc
bin/varnishtest/tests/d00018.vtc
+4
-4
d00021.vtc
bin/varnishtest/tests/d00021.vtc
+8
-8
d00029.vtc
bin/varnishtest/tests/d00029.vtc
+4
-4
d00041.vtc
bin/varnishtest/tests/d00041.vtc
+4
-4
No files found.
bin/varnishtest/tests/d00015.vtc
View file @
1d75f29c
...
@@ -22,33 +22,36 @@ varnish v1 -vcl+backend {
...
@@ -22,33 +22,36 @@ varnish v1 -vcl+backend {
std.log("-- invalid replicas");
std.log("-- invalid replicas");
if (!vd.reconfigure(replicas=0)) {
if (!vd.reconfigure(replicas=0)) {
# continue intentionally
std.log("reconfigure failed");
std.log("reconfigure failed");
}
}
std.log("-- no changes - no debug output");
std.log("-- no changes - no debug output");
if (!vd.reconfigure(replicas=25)) {
if (!vd.reconfigure(replicas=25)) {
# continue intentionally
std.log("reconfigure failed");
std.log("reconfigure failed");
}
}
std.log("-- no backends");
std.log("-- no backends");
if (!vd.clear()) {
if (!vd.clear()) {
std.log("clear failed"
);
return(fail("clear failed")
);
}
}
if (!vd.reconfigure(replicas=25)) {
if (!vd.reconfigure(replicas=25)) {
# continue intentionally
std.log("reconfigure failed");
std.log("reconfigure failed");
}
}
std.log("-- one backend");
std.log("-- one backend");
if (!vd.add_backend(s1)) {
if (!vd.add_backend(s1)) {
std.log("add s1 failed"
);
return(fail("add s1 failed")
);
}
}
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- no change - no output");
std.log("-- no change - no output");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- change, clear, no backends");
std.log("-- change, clear, no backends");
...
@@ -60,6 +63,7 @@ varnish v1 -vcl+backend {
...
@@ -60,6 +63,7 @@ varnish v1 -vcl+backend {
vd.add_backend(s2);
vd.add_backend(s2);
vd.clear();
vd.clear();
if (!vd.reconfigure()) {
if (!vd.reconfigure()) {
# continue intentionally
std.log("reconfigure failed");
std.log("reconfigure failed");
}
}
...
@@ -69,7 +73,7 @@ varnish v1 -vcl+backend {
...
@@ -69,7 +73,7 @@ varnish v1 -vcl+backend {
vd.add_backend(s2);
vd.add_backend(s2);
vd.add_backend(s1);
vd.add_backend(s1);
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- duplicate add with idents");
std.log("-- duplicate add with idents");
...
@@ -82,19 +86,19 @@ varnish v1 -vcl+backend {
...
@@ -82,19 +86,19 @@ varnish v1 -vcl+backend {
vd.add_backend(s2, ident="s1_1");
vd.add_backend(s2, ident="s1_1");
vd.add_backend(s2, ident="s1_2");
vd.add_backend(s2, ident="s1_2");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- remove s1_2 specifically");
std.log("-- remove s1_2 specifically");
vd.remove_backend(ident="s1_2");
vd.remove_backend(ident="s1_2");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- remove all instances of s1");
std.log("-- remove all instances of s1");
vd.remove_backend(s1);
vd.remove_backend(s1);
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- re-add some - no 2nd director");
std.log("-- re-add some - no 2nd director");
...
@@ -110,19 +114,19 @@ varnish v1 -vcl+backend {
...
@@ -110,19 +114,19 @@ varnish v1 -vcl+backend {
vd.add_backend(s3, "8");
vd.add_backend(s3, "8");
vd.add_backend(s3, "9");
vd.add_backend(s3, "9");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- remove second-last");
std.log("-- remove second-last");
vd.remove_backend(ident="8");
vd.remove_backend(ident="8");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- remove last");
std.log("-- remove last");
vd.remove_backend(ident="9");
vd.remove_backend(ident="9");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- END");
std.log("-- END");
...
@@ -146,7 +150,7 @@ varnish v1 -vcl+backend {
...
@@ -146,7 +150,7 @@ varnish v1 -vcl+backend {
vd.add_backend(s1, "0x0e");
vd.add_backend(s1, "0x0e");
vd.add_backend(s1, "0x0f");
vd.add_backend(s1, "0x0f");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
vd.remove_backend(s1, "0x00");
vd.remove_backend(s1, "0x00");
vd.remove_backend(s1, "0x01");
vd.remove_backend(s1, "0x01");
...
@@ -165,7 +169,7 @@ varnish v1 -vcl+backend {
...
@@ -165,7 +169,7 @@ varnish v1 -vcl+backend {
vd.remove_backend(s1, "0x0e");
vd.remove_backend(s1, "0x0e");
vd.remove_backend(s1, "0x0f");
vd.remove_backend(s1, "0x0f");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
vd.set_warmup(0.5);
vd.set_warmup(0.5);
...
@@ -180,7 +184,7 @@ varnish v1 -vcl+backend {
...
@@ -180,7 +184,7 @@ varnish v1 -vcl+backend {
vd.add_backend(s3, "4");
vd.add_backend(s3, "4");
vd.add_backend(s3, "5");
vd.add_backend(s3, "5");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
vd.set_warmup(0);
vd.set_warmup(0);
}
}
...
...
bin/varnishtest/tests/d00016.vtc
View file @
1d75f29c
...
@@ -22,35 +22,39 @@ varnish v1 -vcl+backend {
...
@@ -22,35 +22,39 @@ varnish v1 -vcl+backend {
}
}
sub vcl_recv {
sub vcl_recv {
std.log("-- invalid replicas");
std.log("-- invalid replicas");
if (!vd.reconfigure(replicas=0)) {
if (!vd.reconfigure(replicas=0)) {
# continue intentionally
std.log("reconfigure failed");
std.log("reconfigure failed");
}
}
std.log("-- no changes - no debug output");
std.log("-- no changes - no debug output");
if (!vd.reconfigure(replicas=25)) {
if (!vd.reconfigure(replicas=25)) {
# continue intentionally
std.log("reconfigure failed");
std.log("reconfigure failed");
}
}
std.log("-- no backends");
std.log("-- no backends");
if (!vd.clear()) {
if (!vd.clear()) {
std.log("clear failed"
);
return(fail("clear failed")
);
}
}
if (!vd.reconfigure(replicas=25)) {
if (!vd.reconfigure(replicas=25)) {
# continue intentionally
std.log("reconfigure failed");
std.log("reconfigure failed");
}
}
std.log("-- one backend");
std.log("-- one backend");
if (!vd.add_backend(s1)) {
if (!vd.add_backend(s1)) {
std.log("add s1 failed"
);
return(fail("add s1 failed")
);
}
}
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- no change - no output");
std.log("-- no change - no output");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- change, clear, no backends");
std.log("-- change, clear, no backends");
...
@@ -62,6 +66,7 @@ varnish v1 -vcl+backend {
...
@@ -62,6 +66,7 @@ varnish v1 -vcl+backend {
vd.add_backend(s2);
vd.add_backend(s2);
vd.clear();
vd.clear();
if (!vd.reconfigure()) {
if (!vd.reconfigure()) {
# continue intentionally
std.log("reconfigure failed");
std.log("reconfigure failed");
}
}
...
@@ -71,7 +76,7 @@ varnish v1 -vcl+backend {
...
@@ -71,7 +76,7 @@ varnish v1 -vcl+backend {
vd.add_backend(s2);
vd.add_backend(s2);
vd.add_backend(s1);
vd.add_backend(s1);
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- duplicate add with idents");
std.log("-- duplicate add with idents");
...
@@ -84,19 +89,19 @@ varnish v1 -vcl+backend {
...
@@ -84,19 +89,19 @@ varnish v1 -vcl+backend {
vd.add_backend(s2, ident="s1_1");
vd.add_backend(s2, ident="s1_1");
vd.add_backend(s2, ident="s1_2");
vd.add_backend(s2, ident="s1_2");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- remove s1_2 specifically");
std.log("-- remove s1_2 specifically");
vd.remove_backend(ident="s1_2");
vd.remove_backend(ident="s1_2");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- remove all instances of s1");
std.log("-- remove all instances of s1");
vd.remove_backend(s1);
vd.remove_backend(s1);
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- re-add some - no 2nd director");
std.log("-- re-add some - no 2nd director");
...
@@ -112,23 +117,22 @@ varnish v1 -vcl+backend {
...
@@ -112,23 +117,22 @@ varnish v1 -vcl+backend {
vd.add_backend(s3, "8");
vd.add_backend(s3, "8");
vd.add_backend(s3, "9");
vd.add_backend(s3, "9");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- remove second-last");
std.log("-- remove second-last");
vd.remove_backend(ident="8");
vd.remove_backend(ident="8");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- remove last");
std.log("-- remove last");
vd.remove_backend(ident="9");
vd.remove_backend(ident="9");
if (!vd.reconfigure(replicas=1)) {
if (!vd.reconfigure(replicas=1)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
std.log("-- END");
std.log("-- END");
set req.backend_hint = vd.backend();
set req.backend_hint = vd.backend();
return(pass);
return(pass);
}
}
...
...
bin/varnishtest/tests/d00017.vtc
View file @
1d75f29c
...
@@ -31,16 +31,16 @@ varnish v1 -vcl+backend {
...
@@ -31,16 +31,16 @@ varnish v1 -vcl+backend {
new vd = directors.shard();
new vd = directors.shard();
vd.debug(3);
vd.debug(3);
if (!vd.add_backend(s1)) {
if (!vd.add_backend(s1)) {
std.log("add s1 failed"
);
return(fail("add s1 failed")
);
}
}
if (!vd.add_backend(s2)) {
if (!vd.add_backend(s2)) {
std.log("add s2 failed"
);
return(fail("add s2 failed")
);
}
}
if (!vd.add_backend(s3)) {
if (!vd.add_backend(s3)) {
std.log("add s3 failed"
);
return(fail("add s3 failed")
);
}
}
if (!vd.reconfigure(replicas=25)) {
if (!vd.reconfigure(replicas=25)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
}
}
...
...
bin/varnishtest/tests/d00018.vtc
View file @
1d75f29c
...
@@ -22,16 +22,16 @@ varnish v1 -vcl+backend {
...
@@ -22,16 +22,16 @@ varnish v1 -vcl+backend {
sub vcl_init {
sub vcl_init {
new vd = directors.shard();
new vd = directors.shard();
if (!vd.add_backend(s1)) {
if (!vd.add_backend(s1)) {
std.log("add s1 failed"
);
return(fail("add s1 failed")
);
}
}
if (!vd.add_backend(s2)) {
if (!vd.add_backend(s2)) {
std.log("add s2 failed"
);
return(fail("add s2 failed")
);
}
}
if (!vd.add_backend(s3)) {
if (!vd.add_backend(s3)) {
std.log("add s3 failed"
);
return(fail("add s3 failed")
);
}
}
if (!vd.reconfigure(replicas=25)) {
if (!vd.reconfigure(replicas=25)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
}
}
...
...
bin/varnishtest/tests/d00021.vtc
View file @
1d75f29c
...
@@ -22,32 +22,32 @@ varnish v1 -vcl+backend {
...
@@ -22,32 +22,32 @@ varnish v1 -vcl+backend {
sub vcl_init {
sub vcl_init {
new vd = directors.shard();
new vd = directors.shard();
if (!vd.add_backend(s1)) {
if (!vd.add_backend(s1)) {
std.log("add s1 failed"
);
return(fail("add s1 failed")
);
}
}
if (!vd.add_backend(s2)) {
if (!vd.add_backend(s2)) {
std.log("add s2 failed"
);
return(fail("add s2 failed")
);
}
}
if (!vd.add_backend(s3)) {
if (!vd.add_backend(s3)) {
std.log("add s3 failed"
);
return(fail("add s3 failed")
);
}
}
if (!vd.reconfigure(replicas=25)) {
if (!vd.reconfigure(replicas=25)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
new l = directors.shard();
new l = directors.shard();
new lp = directors.shard_param();
new lp = directors.shard_param();
l.associate(lp.use());
l.associate(lp.use());
if (!l.add_backend(s1)) {
if (!l.add_backend(s1)) {
std.log("add s1 failed"
);
return(fail("add s1 failed")
);
}
}
if (!l.add_backend(s2)) {
if (!l.add_backend(s2)) {
std.log("add s2 failed"
);
return(fail("add s2 failed")
);
}
}
if (!l.add_backend(s3)) {
if (!l.add_backend(s3)) {
std.log("add s3 failed"
);
return(fail("add s3 failed")
);
}
}
if (!l.reconfigure(replicas=25)) {
if (!l.reconfigure(replicas=25)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
new ll = directors.round_robin();
new ll = directors.round_robin();
ll.add_backend(l.backend());
ll.add_backend(l.backend());
...
...
bin/varnishtest/tests/d00029.vtc
View file @
1d75f29c
...
@@ -22,16 +22,16 @@ varnish v1 -vcl+backend {
...
@@ -22,16 +22,16 @@ varnish v1 -vcl+backend {
sub vcl_init {
sub vcl_init {
new vd = directors.shard();
new vd = directors.shard();
if (!vd.add_backend(s1)) {
if (!vd.add_backend(s1)) {
std.log("add s1 failed"
);
return(fail("add s1 failed")
);
}
}
if (!vd.add_backend(s2)) {
if (!vd.add_backend(s2)) {
std.log("add s2 failed"
);
return(fail("add s2 failed")
);
}
}
if (!vd.add_backend(s3)) {
if (!vd.add_backend(s3)) {
std.log("add s3 failed"
);
return(fail("add s3 failed")
);
}
}
if (!vd.reconfigure(replicas=25)) {
if (!vd.reconfigure(replicas=25)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
vd.debug(1);
vd.debug(1);
...
...
bin/varnishtest/tests/d00041.vtc
View file @
1d75f29c
...
@@ -24,16 +24,16 @@ varnish v1 -vcl+backend {
...
@@ -24,16 +24,16 @@ varnish v1 -vcl+backend {
new vd = directors.shard();
new vd = directors.shard();
vd.debug(3);
vd.debug(3);
if (!vd.add_backend(s1)) {
if (!vd.add_backend(s1)) {
std.log("add s1 failed"
);
return(fail("add s1 failed")
);
}
}
if (!vd.add_backend(s2, weight=2)) {
if (!vd.add_backend(s2, weight=2)) {
std.log("add s2 failed"
);
return(fail("add s2 failed")
);
}
}
if (!vd.add_backend(s3, weight=3)) {
if (!vd.add_backend(s3, weight=3)) {
std.log("add s3 failed"
);
return(fail("add s3 failed")
);
}
}
if (!vd.reconfigure(replicas=25)) {
if (!vd.reconfigure(replicas=25)) {
std.log("reconfigure failed"
);
return(fail("reconfigure failed")
);
}
}
}
}
...
...
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